[v8-dev] Symbol Corruption in v8_monolith.lib on Windows (v11.4/v11.5)

17 views
Skip to first unread message

Sam Cao

unread,
May 24, 2023, 10:35:15 PM5/24/23
to v8-...@googlegroups.com
Dear V8 Dev Team,

I'd like to report a minor issue about symbol corruption in v8_monolith.lib on Windows.

I tried to build V8 monolith on Windows 10 for v11.4 and v11.5 recently. The builds were good. However, when I tried to build my app linking v8_monolith.lib, I got the following error messages.

javet_converter.obj : error LNK2019: unresolved external symbol "private: static unsigned __int64 * __cdecl v8::internal::HandleScope::Extend(class v8::internal::Isolate *)" (?Extend @HandleScope@internal@v8@@CAPEA_KPEAVIsolate@23@@Z) referenced in function "class _jobject * __cdecl Javet::Converter::ToExternalV8Value(struct JNIEnv_ *,class Javet::V8Runtime const  *,class v8::Local<class v8::Context> const &,class v8::internal::Object const &)" (?ToExternalV8Value@Converter@Javet@@YAPEAV_jobject@@PEAUJNIEnv_@@PEBVV8Runtime@2@AEBV?$Local@VCont ext@v8@@@v8@@AEBVObject@internal@7@@Z)

I located the symbols via dumpbin and found the highlighted one actually is CUPEA_KPEAVIsolate.

I'm not sure what caused the corrupted V8 build. I fixed it by binary searching and replacing CUPEA_KPEAVIsolate with CAPEA_KPEAVIsolate, and it works.

The code triggering this issue is like v8::internal::Handle(v8InternalObject, v8InternalIsolate).

Could you check it out once you have time?

Thank you and have a nice day,
Sam
Reply all
Reply to author
Forward
0 new messages