Closed
Description
./configure --fully-static --use-largepages
labuser@y004:~/ssuresh/node-ssuresh$ ./node
Illegal instruction (core dumped)
I debugged this problem and when we use --fully-static
, the .text
segment contains libc
code for mmap
. This is one of the functions that is called during the actual moving of the TextRegion and one of the requirement was to not have any functions that are called in MoveTextRegionToLargePages
themselves being moved.
#0 0x00000000017690c0 in mmap64 ()
#1 0x000000000060006f in node::MoveTextRegionToLargePages(node::text_region const&) ()
#2 0x000000000078519e in node::MapStaticCodeToLargePages() ()
I have a fix/workaround for it by moving all of the static code libc into the .lpstub
region. Another potential fix is to use the SYSCALL interface to call the mmap
, I havent tried that yet.
I will send a PR with the fix. @refack @uttampawar @gireeshpunathil @lundibundi @addaleax
- Version: master
- Platform: Linux
- Subsystem: src