terratenney / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

Segmentation Fault instead of RangeError #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> import PyV8
>>> class Foo(PyV8.JSClass):
...     def bar(self):
...             pass
... 
>>> ctxt = PyV8.JSContext(Foo())
>>> ctxt.enter()
>>> ctxt.eval("function f() { bar(); f();} f();")
Segmentation fault
...and Python interpreter crashes.

What is the expected output? What do you see instead?
I would expect some error message similar to this:

>>> import PyV8
>>> ctxt = PyV8.JSContext()
>>> ctxt.enter()
>>> ctxt.eval("function f() { f();} f();")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: RangeError: Maximum call stack size exceeded (  @ 1 : 10 )  -> 
function f() { f();} f();

What version of the product are you using? On what operating system?
PyV8: from trunk, rev 435.
OS: Debian Wheezy 64bit.

Please provide any additional information below.
In attachment you can find test file in Python with code that results in 
SegFault.

Original issue reported on code.google.com by lukasz.s...@gmail.com on 11 May 2012 at 12:31

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by flier...@gmail.com on 12 May 2012 at 1:18

GoogleCodeExporter commented 9 years ago
Please verify it with SVN trunk code after r436, thanks

Original comment by flier...@gmail.com on 12 May 2012 at 2:33

GoogleCodeExporter commented 9 years ago
It works fine. Thanks a lot for such a quick response.

Original comment by lukasz.s...@gmail.com on 14 May 2012 at 7:00

GoogleCodeExporter commented 9 years ago
You are welcome :)

Original comment by flier...@gmail.com on 14 May 2012 at 10:33