Status: New
Owner: ----
New issue 1597 by [email protected]: fail to load v8 at amd64 in the debug
mode
http://code.google.com/p/v8/issues/detail?id=1597
I'm working on a Java wrapper which implemented the Java Scripting API
(JSR223) base on the Google V8 Javascript engine.
http://code.google.com/p/jav8
When I build it on the ubuntu 10 at amd64 platform, it will crash when I
call the v8 function from a new thread
$ uname -a
Linux domU-12-31-39-04-2D-84 2.6.32-317-ec2 #36-Ubuntu SMP Fri Jul 8
18:12:30 UTC 2011 x86_64 GNU/Linux
I have check out v8 from SVN trunk and build it with debug mode
$ svn info
Path: .
URL: http://v8.googlecode.com/svn/trunk
Repository Root: http://v8.googlecode.com/svn
Repository UUID: ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revision: 8886
Node Kind: directory
Schedule: normal
Last Changed Author: [email protected]
Last Changed Rev: 8883
Last Changed Date: 2011-08-10 14:15:35 +0000 (Wed, 10 Aug 2011)
$export CCFLAGS=-fPIC
$scons arch=x64 mode=debug
It seems the Isolate::New or Isolate::Enter doesn't initialize it's logger
struct V8Isolate {
V8Isolate() {
if (v8::Isolate::GetCurrent() == NULL)
{
v8::Isolate::New()->Enter();
}
}
};
void JNICALL Java_lu_flier_script_V8Context_internalRelease
(JNIEnv *pEnv, jobject, jlong ptr)
{
if (ptr) {
jni::V8Isolate isolate;
v8::Persistent<v8::Context> ctxt((v8::Context *) ptr);
ctxt->Exit();
ctxt.Dispose();
}
}
(gdb) bt
#0 0x00007ffff766ca75 in raise () from /lib/libc.so.6
#1 0x00007ffff76705c0 in abort () from /lib/libc.so.6
#2 0x00007ffff0cedc9f in v8::internal::OS::Abort () at
src/platform-linux.cc:421
#3 0x00007ffff0b9575a in V8_Fatal (file=0x7ffff0ef1161 "src/isolate.h",
line=802,
format=0x7ffff0ef0e30 "CHECK(%s) failed") at src/checks.cc:58
#4 0x00007ffff0b496c4 in CheckHelper (file=0x7ffff0ef1161 "src/isolate.h",
line=802, source=0x7ffff0ef14b0 "logger_ != __null", condition=false)
at src/checks.h:60
#5 0x00007ffff0b69412 in v8::internal::Isolate::logger() ()
from /home/ubuntu/jav8/libjav8.so
#6 0x00007ffff0b4acad in v8::V8::DisposeGlobal (obj=0x7fffec1ef750)
at src/api.cc:630
#7 0x00007ffff0b2d970 in v8::Persistent<v8::Context>::Dispose (
this=0x7ffff1980200) at /home/ubuntu/v8/include/v8.h:3875
#8 0x00007ffff0b2bf48 in Java_lu_flier_script_V8Context_internalRelease (
pEnv=0x7fffec0011d0, ptr=140737154840400) at
/home/ubuntu/jav8/jni/jav8.cpp:186
#9 0x00007ffff2925d6e in ?? ()
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev