Hello, I tried to build both the original HelloWorld and the one with your modifications on Linux and on MacOS. No crashes. Something must be wrong with your build environment. Maybe try to clean the build dir and start from scratch using a more standard set of gn args: `tools/dev/gm.py x64.optdebug.check` (it'll build v8 and run tests).
On Fri, May 3, 2024 at 2:31 AM dong tommy <tommy.dong1...@gmail.com> wrote: > > Even without any change for Hello World, I still get the below crash when > exiting with v8 12.3.x: > > * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS > (code=EXC_I386_GPFLT) > * frame #0: 0x00000001003b2ad0 > hello-world`v8::internal::Isolate::Exit(this=0x0000000100000001) at > isolate.cc:5060:3 [opt] > frame #1: 0x0000000100004e08 hello-world`v8::Isolate::Scope::~Scope() > + 24 > frame #2: 0x0000000100004c25 hello-world`v8::Isolate::Scope::~Scope() > + 21 > frame #3: 0x0000000100004907 hello-world`main + 1607 > frame #4: 0x00007ff804d2941f dyld`start + 1903 > > 在2024年5月3日星期五 UTC+8 07:57:13<dong tommy> 写道: > >> The args are: >> 'is_debug = true', >> 'enable_iterator_debugging = true', >> 'symbol_level = 1', >> 'target_cpu = "x64"', >> 'is_component_build = false', >> 'is_chrome_branded = false', >> 'treat_warnings_as_errors = false', >> 'is_clang = true', >> 'use_glib = false', >> 'use_custom_libcxx = false', >> 'use_custom_libcxx_for_host = false', >> 'optimize_for_size = false', >> 'v8_monolithic = true', >> 'v8_static_library = true', >> 'v8_use_external_startup_data = false', >> 'v8_enable_i18n_support = false', >> 'v8_enable_webassembly = false', >> 'v8_enable_lite_mode = true', >> 'v8_enable_snapshot_compression = true', >> 'exclude_unwind_tables = true', >> 'v8_enable_verify_heap = false' >> >> >> >> 在2024年5月3日星期五 UTC+8 07:48:53<dong tommy> 写道: >> >>> Hi Experts, >>> >>> I added a v8::EscapableHandleScope case and tested the below Hello >>> World code( >>> https://raw.githubusercontent.com/v8/v8/12.3.219/samples/hello-world.cc) >>> for the V8 engine(https://github.com/v8/v8) and found that it works >>> well with v8 11.x.x version. However, it crashed or aborted with v8 12.3.x >>> version in GetObjectTemplate. Does anyone have any idea about that issue? >>> or any mistake I made? Thanks! >>> >>> >>> https://stackoverflow.com/questions/78420822/check-failed-on-escapablehandlescopeescape >>> >>> void Test(v8::Local<v8::Name> name, >>> const v8::PropertyCallbackInfo<v8::Value>& info) { >>> } >>> >>> v8::Local<v8::ObjectTemplate> GetObjectTemplate(v8::Isolate* isolate) >>> { >>> v8::EscapableHandleScope handle_scope(isolate); >>> v8::Local<v8::ObjectTemplate> result = >>> v8::ObjectTemplate::New(isolate); >>> result->SetInternalFieldCount(1); >>> result->SetHandler(v8::NamedPropertyHandlerConfiguration(Test)); >>> return handle_scope.Escape(result); >>> } >>> >>> int main(int argc, char* argv[]) { >>> // Initialize V8. >>> v8::V8::InitializeICUDefaultLocation(argv[0]); >>> v8::V8::InitializeExternalStartupData(argv[0]); >>> std::unique_ptr<v8::Platform> platform = >>> v8::platform::NewDefaultPlatform(); >>> v8::V8::InitializePlatform(platform.get()); >>> v8::V8::Initialize(); >>> >>> // Create a new Isolate and make it the current one. >>> v8::Isolate::CreateParams create_params; >>> create_params.array_buffer_allocator = >>> v8::ArrayBuffer::Allocator::NewDefaultAllocator(); >>> v8::Isolate* isolate = v8::Isolate::New(create_params); >>> { >>> v8::Isolate::Scope isolate_scope(isolate); >>> >>> // Create a stack-allocated handle scope. >>> v8::HandleScope handle_scope(isolate); >>> >>> v8::Local<v8::ObjectTemplate> global = GetObjectTemplate(isolate); >>> // aborted here >>> >> -- > -- > 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/f011e3ee-ef58-46d1-a1eb-3d7dee6ad4aen%40googlegroups.com > <https://groups.google.com/d/msgid/v8-users/f011e3ee-ef58-46d1-a1eb-3d7dee6ad4aen%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Igor Sheludko Software Engineer ish...@google.com Google Germany GmbH Erika-Mann-Straße 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. -- -- 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/CAOAEZ4Ncyc%2BqAO6XjNnFJRxLRCaZFQb5O0Zzp-LkYvLc5X8Y6w%40mail.gmail.com.