Comment #3 on issue 2207 by [email protected]: Win64 d8 built with GYP
crashes during startup in release mode
http://code.google.com/p/v8/issues/detail?id=2207
Thank you, Philippe. I tried reverting that part, but it didn't fix the
crash. I landed a temporary fix that enables WPO:
https://code.google.com/p/v8/source/detail?r=11933
I did some printf-debugging and found out that crash happens in
Locker::Locker() immediately after call to V8::Initialize() when accessing
the "isolate_" variable.
If I add a reference to the "isolate" variable (with printf or CHECK) at
the end of V8::Initialize() then d8 doesn't crash on startup (but some
tests still fail):
diff --git a/src/api.cc b/src/api.cc
index 0d88047..8b1b484 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4203,10 +4203,14 @@ void v8::Object::SetPointerInInternalField(int
index, void* value) {
bool v8::V8::Initialize() {
i::Isolate* isolate = i::Isolate::UncheckedCurrent();
+ // printf("==> v8::V8::Initialize %x\n", (int)isolate);
if (isolate != NULL && isolate->IsInitialized()) {
return true;
}
- return InitializeHelper();
+ bool r = InitializeHelper();
+ CHECK(isolate != NULL);
+ // printf("<== v8::V8::Initialize %x\n", (int)isolate);
+ return r;
}
diff --git a/src/v8threads.cc b/src/v8threads.cc
index fd8d536..0c14aa5 100644
--- a/src/v8threads.cc
+++ b/src/v8threads.cc
@@ -63,7 +63,9 @@ Locker::Locker(v8::Isolate* isolate)
// initialize here, before anyone can call ~Locker() or Unlocker().
if (!isolate_->IsInitialized()) {
isolate_->Enter();
+ // printf("==> Locker::Locker isolate_ = %x\n", (int)isolate_);
V8::Initialize();
+ // printf("<== Locker::Locker isolate_ = %x\n", (int)isolate_);
isolate_->Exit();
}
This looks like VS 2008 bug. It would be interesting to test with VS 2010.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev