tbodt/v8py

Example in readme fails with segmentation fault!

cg-cnu opened this issue · 4 comments

Running the example in the read me gives a segmentation fault...

>>> context.expose(print_hello)
>>> context.eval('print_hello()')
Received signal 11 <unknown> 000000000000

==== C stack trace ===============================

 [0x7fc4a8f09ad1]
 [0x7fc4b0b68130]
 [0x7fc4b0e29134]
 [0x7fc4b0e29539]
 [0x7fc4a85a29e4]
 [0x7fc4a85a2d20]
 [0x7fc4b0e14e33]
 [0x7fc4b0dbf073]
 [0x7fc4b0dbf96c]
 [0x7fc4a859bfd8]
 [0x7fc4b0e55b94]
 [0x7fc4b0e571ad]
 [0x7fc4b0e572b2]
 [0x7fc4b0e706ef]
 [0x7fc4b0e727a0]
 [0x7fc4b0e7298e]
 [0x7fc4b0e7301e]
 [0x7fc4b0e83b3f]
 [0x7fc4b00b0af5]
 [0x000000400721]
[end of stack trace]
Segmentation fault (core dumped)
tbodt commented

Works on my machine. Going to try installing on Linux and see if I can repro there.

Sorry forgot to mention am on CentOS Linux release 7.1.1503 (Core)
Let me know if you need any more info.

We've traced this issue to a bug in the Python interpreter, specifically in PyUnicode_FromFormat.

It's probably this, fixed in 2.7.9: https://bugs.python.org/issue22023 - notably the system Python in Ubuntu 14.04 is 2.7.6, so v8py won't work there currently.

Thanks for v8py, it seems very well put-together.

tbodt commented

Thanks for tracking that down alex!