RoamUniverse / pyv8

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

Segmentation fault #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The broken code is:

    ops = ['==', '!=', '>', '<', '>=', '<=', '===', '!==']
    t = [ 0, 1, 2, 15, 123, -100, 
          "'0'", "'1'", "'2'", "'15'", "'123'", "'-100'",
          .0, .1, .2, .15, .123, -.100, 
          "'.0'", "'.1'", "'.2'", "'.15'", "'.123'", "'-.100'",
          '"abc"', "'abc'", "'абв'", "'测试'",
          "true", "false", "NaN", "Infinity", "null",
          "{}", "[]", "function(){}" ]

    for op in ops:
        for a in t:
            for b in t:
                t_ = "(%s %s %s)" % (a, op, b)
                print ">", t_
                ctx.eval(t_)

System: ubuntu hardy, python 2.5

Unfortunately i have no tested it in windows, as PyV8 raise exception on
import:

>>> import PyV8

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import PyV8
  File "C:\Python26\lib\site-packages\PyV8.py", line 8, in <module>
    import _PyV8
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is
read-only

system: windows xp, python 2.6.4

Original issue reported on code.google.com by buzz...@gmail.com on 18 Dec 2009 at 6:08

GoogleCodeExporter commented 9 years ago
I have submitted the code that use add_property instead of def_readonly, could 
you help 
us to verify the issue on your system? Because my Win7 with Python 2.6.4.8 
can't reproduce 
the issue :(

Please check out the code from SVN after revision #173, and compile it with V8 
2.0.x, or use 
the private build in the attachment of issue #12 for your test.

Original comment by flier...@gmail.com on 20 Dec 2009 at 3:16