mehdigriche / pyv8

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

PyV8 testLocker segmentation fault #154

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

After upgrading both V8 and and, it seems like PyV8 test segfaults as shown 
below

buffer@saiph ~/pyv8 $ python PyV8.py -v        
2013-01-21 23:08:14,734 INFO testing PyV8 module 1.0 with V8 v3.16.7
testBlock (__main__.TestAST) ... ok
testCallStatements (__main__.TestAST) ... ok
testForStatement (__main__.TestAST) ... ok
testIfStatement (__main__.TestAST) ... ok
testLiterals (__main__.TestAST) ... ok
testOperations (__main__.TestAST) ... ok
testTryStatements (__main__.TestAST) ... ok
testMultiNamespace (__main__.TestContext) ... ok
testEventDispatch (__main__.TestDebug) ... 2013-01-21 23:08:14,757 DEBUG 
receive debug event: before compile script: <script script  @ 0:0> : 'function 
test() { text = "1+2"; return eval(text) } test()'

2013-01-21 23:08:14,759 DEBUG receive debug event: after compile script: 
<script script  @ 0:0> : 'function test() { text = "1+2"; return eval(text) } 
test()'

2013-01-21 23:08:14,764 DEBUG receive debug event: before compile script: 
<script script None @ 0:0> : '1+2'
#00 test() [unnamed] line 1 column 45 (position 45)#01 [anonymous]() [unnamed] 
line 1 column 53 (position 53)
2013-01-21 23:08:14,767 DEBUG receive debug event: after compile script: 
<script script None @ 0:0> : '1+2'
#00 test() [unnamed] line 1 column 45 (position 45)#01 [anonymous]() [unnamed] 
line 1 column 53 (position 53)
ok
testClassProperties (__main__.TestEngine) ... ok
testCompile (__main__.TestEngine) ... ok
testEval (__main__.TestEngine) ... ok
testExtension (__main__.TestEngine) ... ok
testGlobal (__main__.TestEngine) ... ok
testMemoryAllocationCallback (__main__.TestEngine) ... FAIL
testNativeExtension (__main__.TestEngine) ... ok
testObjectBuildInMethods (__main__.TestEngine) ... ok
testPrecompile (__main__.TestEngine) ... ok
testPythonWrapper (__main__.TestEngine) ... ok
testThis (__main__.TestEngine) ... ok
testUnicodeSource (__main__.TestEngine) ... ok
testLocker (__main__.TestMultithread) ... Segmentation fault

Additional info

buffer@saiph ~/v8 $ svn info
Path: .
Working Copy Root Path: /home/buffer/v8
URL: http://v8.googlecode.com/svn/trunk
Repository Root: http://v8.googlecode.com/svn
Repository UUID: ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revision: 13459
Node Kind: directory
Schedule: normal
Last Changed Author: yangguo@chromium.org
Last Changed Rev: 13451
Last Changed Date: 2013-01-21 15:39:38 +0100 (Mon, 21 Jan 2013)

buffer@saiph ~/pyv8 $ svn info
Path: .
Working Copy Root Path: /home/buffer/pyv8
URL: http://pyv8.googlecode.com/svn/trunk
Repository Root: http://pyv8.googlecode.com/svn
Repository UUID: 3b770cb8-f9e6-11dd-ac5b-dfceb64ead24
Revision: 472
Node Kind: directory
Schedule: normal
Last Changed Author: flier.lu@gmail.com
Last Changed Rev: 472
Last Changed Date: 2013-01-19 15:50:56 +0100 (Sat, 19 Jan 2013)

Original issue reported on code.google.com by angelo.d...@gmail.com on 21 Jan 2013 at 10:13

GoogleCodeExporter commented 8 years ago
A deeper analysis revealed that the test segfaults while accessing 
JSLocker.locked at line 1755

1752 class TestMultithread(unittest.TestCase):
1753     def testLocker(self):
1754         self.assertFalse(JSLocker.active)
1755         self.assertFalse(JSLocker.locked)

I simply modified the code in order to 'dir' the JSLocker attributes and the 
attribute `locked' seems to exist but every attempt to access it leads to the 
segfault.  

Original comment by angelo.d...@gmail.com on 21 Jan 2013 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by flier...@gmail.com on 1 Feb 2013 at 1:59

GoogleCodeExporter commented 8 years ago
Please verify the issue with SVN trunk code after r474, thanks

Original comment by flier...@gmail.com on 2 Feb 2013 at 3:42

GoogleCodeExporter commented 8 years ago
I confirm r474 fixed the issue. Thanks

Original comment by angelo.d...@gmail.com on 2 Feb 2013 at 4:39

GoogleCodeExporter commented 8 years ago

Original comment by flier...@gmail.com on 3 Feb 2013 at 1:16