On Thu, Nov 21, 2019 at 6:10 PM Zoltan B <zbendef...@gmail.com> wrote:
>
> Hi!
>
> I'm running an electron app, that loads native application (using ffi) that 
> renders content into a canvas in electron. This native C++ code has an 
> embedded V8 inside it.
> I'm compiling V8 into dynamic libraries (.dylib files) (use_component_build 
> is set to true).
>
> My issue is that the V8 inside Electron seems to clash with my V8 instance 
> (they are not the same version), but only on macOS.
> If you look at the call-stack below of the segmentation fault, you can see 
> that it begins in libv8.dylib, but ends up somehow in libnode.dylib which I 
> can't really explain.
>
> Thread 16 Crashed:
> 0 libnode.dylib 0x0000000108306911 0x107c70000 + 6908177
> 1 libnode.dylib 0x000000010830609c void 
> v8::internal::LookupIterator::Start<false>() + 60
> 2 libv8.dylib 0x0000000118bbc354 
> v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(v8::internal::Handle<v8::internal::JSObject>,
>  v8::internal::Handle<v8::internal::Name>, 
> v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes) 
> + 164 (js-objects.cc:3148)
> 3 libv8.dylib 0x0000000118a9bc06 
> v8::internal::Genesis::GetThrowTypeErrorIntrinsic() + 118 (handles.h:144)
> 4 libv8.dylib 0x0000000118a9c13d 
> v8::internal::Genesis::AddRestrictedFunctionProperties(v8::internal::Handle<v8::internal::JSFunction>)
>  + 29 (bootstrapper.cc:1109)
> 5 libv8.dylib 0x0000000118ab1de5 
> v8::internal::Genesis::Genesis(v8::internal::Isolate*, 
> v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, 
> v8::Local<v8::ObjectTemplate>, unsigned long, 
> v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) + 1269 
> (bootstrapper.cc:5446)
> 6 libv8.dylib 0x0000000118a9b209 
> v8::internal::Bootstrapper::CreateEnvironment(v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>,
>  v8::Local<v8::ObjectTemplate>, v8::ExtensionConfiguration*, unsigned long, 
> v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) + 89 
> (bootstrapper.cc:5374)
> 7 libv8.dylib 0x00000001188862aa v8::NewContext(v8::Isolate*, 
> v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, 
> v8::MaybeLocal<v8::Value>, unsigned long, 
> v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) + 1722 
> (api.cc:5697)
> 8 libv8.dylib 0x00000001188866fa v8::Context::New(v8::Isolate*, 
> v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, 
> v8::MaybeLocal<v8::Value>, v8::DeserializeInternalFieldsCallback, 
> v8::MicrotaskQueue*) + 42 (api.cc:5856)
>
>
>
> Is it possible that when libv8.dylib loads the subsequent .dylib files with 
> dlopen() (such as libv8_platform.dylib etc.) that dlopen somehow fetches the 
> V8 symbols inside the libnode.dylib?
>
> Electron version I'm using: 1.8.8
> V8 versions I'm using in my app: 7.2 (I tried it with 7.8 too but with the 
> same results)
>
> Could anyone help me out how to avoid this?

Since you're only seeing this on macOS: is anything linked with -flat_namespace?

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAHQurc_DJMgaCaXin0AmhFCQAj0TijkVaKy5Kwt8zbCFoDWj5A%40mail.gmail.com.

Reply via email to