Closed GoogleCodeExporter closed 9 years ago
i can confirm that I get the same segfault under r560 using both of the
following:
ubuntu 12.04
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
v8/trunk r18331
libboost1.48-all-dev
python 2.7.3
and
osx 10.9
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
v8/trunk r18331
boost 1.55 via brew
python 2.7.6
any python call to prog.toJSON triggers the segfault in:
gdb --args python callgraph.py commonjs/program.js
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff68f63b1 in _IO_vfprintf_internal (s=<optimized out>,
format=<optimized out>, ap=<optimized out>)
at vfprintf.c:1630
1630 vfprintf.c: No such file or directory.
Original comment by reds...@gmail.com
on 17 Dec 2013 at 10:32
[deleted comment]
Also, whenever the setup.py is told to use DEBUG mode, PyV8 fails to link with
duplicate symbol errors:
../thug/utils/v8/out/../src/prettyprinter.cc:1161: multiple definition of
`v8::internal::AstPrinter::VisitThisFunction(v8::internal::ThisFunction*)'
build/temp.linux-x86_64-2.7/src/PrettyPrinter.o:../thug/utils/pyv8/src/PrettyPri
nter.cpp:1156: first defined here
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
duplicate symbol __ZTSN2v88internal10AstPrinterE in:
build/temp.macosx-10.9-x86_64-2.7/src/PrettyPrinter.o
../thug/utils/v8/out/x64.debug//libv8_base.x64.a(prettyprinter.o)
ld: 130 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1
and the setup.py also doesn't take into account Boost's debug libs
libboost_python-d and libboost_python-mt-d, etc.
a simple patch would be:
--- setup.py-old 2013-12-17 17:41:42.000000000 -0500
+++ setup.py 2013-12-17 17:41:16.000000000 -0500
@@ -137,6 +137,8 @@
if BOOST_MT:
boost_libs = [lib + '-mt' for lib in boost_libs]
+if DEBUG:
+ boost_libs = [lib + '-d' for lib in boost_libs]
include_dirs = [
os.path.join(V8_HOME, 'include'),
Original comment by reds...@gmail.com
on 17 Dec 2013 at 10:43
The root cause is PyV8 use * operator of SmartPointerBase, but V8 has changed
its behaviors.
Please verify the fix with SVN trunk code after r563
Original comment by flier...@gmail.com
on 24 Dec 2013 at 4:21
Verified for me.
Original comment by es...@mrfjo.org
on 24 Dec 2013 at 9:44
Thanks
Original comment by flier...@gmail.com
on 25 Dec 2013 at 2:08
Original issue reported on code.google.com by
angelo.d...@gmail.com
on 13 Dec 2013 at 8:58