HexType icon indicating copy to clipboard operation
HexType copied to clipboard

ChakraCore build error

Open mcgov opened this issue 8 years ago • 2 comments

Built ChakraCore with the hextype enabled version of clang from this repo on Ubuntu 16.04 LTS. I actually suspect that this could be a problem with Chakra's build makefiles, but I'd like help diagnosing what is going wrong.

Build succeeds, on attempting to run anything there is a fatal dllopen error.

dlopen() failed; dlerror says '/mnt/f/ChakraHex/ChakraCore/out/Debug/libChakraCore.so: undefined symbol: __update_phantom_info'
FATAL ERROR: Unable to load /mnt/f/ChakraHex/ChakraCore/out/Debug/libChakraCore.so GetLastError=0x7e

This looks like some symbol that should have been compiled in when I included -fsanitize=hextype. Any ideas? I'm digging around trying to find a missing -fsanitize line at the moment. I'd be very happy to get any advice. I guess I'll attempt building the library statically and report back.

mcgov avatar Jan 17 '18 17:01 mcgov

Building the library with --static fixes the issue. I can also confirm hextype will catch some type confusions when compiled into the executable ch (though not in JIT compiled code since it lacks instrumentation) when it's compiled with ChakraCore embedded statically.

Pretty neat! Have you experienced issues using hextype sanitization in dynamic libraries? Is this maybe something smart people just know to avoid?

mcgov avatar Jan 17 '18 21:01 mcgov

We did not test this case. Thanks for the report and I will try to test it and check the result.

jys0710 avatar Jan 18 '18 12:01 jys0710