Missing symbol ___asan_version_mismatch_check_v8

182 views
Skip to first unread message

tbl...@icloud.com

unread,
Dec 1, 2016, 2:43:14 PM12/1/16
to v8-users
I'm trying to build both V8 and my library that embeds with the address sanitizer, and I'm getting this error when trying to load my library:

dlopen(v8py.so, 2): Symbol not found: ___asan_version_mismatch_check_v8
 
Referenced from: v8py.so
 
Expected in: flat namespace
 
in v8py.so

What's going on?

Potentially relevant information:
  • My library is a dynamic-link library that statically links with V8. I'm building V8 with -fPIC so that this can work.
  • V8 is being built with the prebuilt version of clang downloaded by gclient sync, and my library is built with the version of clang that comes with macos.
  • I can't find ___asan_version_mismatch_check_v8 anywhere in the V8 source, or anywhere on Google or Github. So I have no idea what it's for or what it does.
~Theodore

tbl...@icloud.com

unread,
Dec 1, 2016, 2:44:03 PM12/1/16
to v8-users
Also, d8 loads fine.

tbl...@icloud.com

unread,
Dec 1, 2016, 2:52:13 PM12/1/16
to v8-users
I just tried compiling my library with the same prebuilt compiler used for v8 (third_party/llvm-build/Release+Asserts/bin/clang), and it still didn't work.

tbl...@icloud.com

unread,
Dec 1, 2016, 3:19:04 PM12/1/16
to v8-users
Well, I looked a little more closely at the compiler options and discovered that my library is not, in fact, getting compiled with ASAN. Only V8 is.

Now the problem is that if I compile the library with the same compiler as V8, it can't find @executable_path/libclang_rt.asan_osx_dynamic.dylib, but if I compile it with the system version of clang, I still get a missing ___asan_version_mismatch_check_v8, because the binary includes ___asan_version_mismatch_check_apple_800 instead.

I'm going to try compiling V8 with system clang, hopefully that'll work.

tbl...@icloud.com

unread,
Dec 1, 2016, 3:51:57 PM12/1/16
to v8-users
That didn't work. V8 insisted on linking with the asan runtime included with it's special version of clang, so mkpeephole wouldn't run because it couldn't find ___asan_version_mismatch_check_apple_800. I'm going to try playing with the executable path.
Reply all
Reply to author
Forward
0 new messages