commial / python-spidermonkey

Automatically exported from code.google.com/p/python-spidermonkey
GNU General Public License v2.0
0 stars 0 forks source link

segmentation fault in snow leopard #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here is the script 

from spidermonkey import Runtime

rt  = Runtime();
cx  = rt.new_context();
accCode = str(cx.eval_script(jscode));

It will exit the application and show the following error

segmentation fault

try..except cannot catch this error.

Original issue reported on code.google.com by wjia...@gmail.com on 8 Sep 2009 at 11:28

GoogleCodeExporter commented 9 years ago
This is python 2.6 and the following is the error message:

Process:         Python [6283]
Path:            
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Co
ntents/MacOS/Pytho
n
Identifier:      Python
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [4526]

PlugIn Path:       /usr/local/spidermonkey/lib/libjs.dylib
PlugIn Identifier: libjs.dylib
PlugIn Version:    ??? (???)

Date/Time:       2009-09-08 16:36:33.433 -0700
OS Version:      Mac OS X 10.6 (10A432)
Report Version:  6

Interval Since Last Report:          3668 sec
Crashes Since Last Report:           2
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      BDCA12EB-CCF2-414A-9A2E-362C23BCC2BE

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000008acc00
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libjs.dylib                     0x000000010058b778 js_GetGCStringRuntime + 
37 (jsgc.c:509)
1   libjs.dylib                     0x0000000100550490 JS_GetStringBytes + 21 
(jsapi.c:4553)
2   spidermonkey.so                 0x000000010051cfae 
__pyx_f_12spidermonkey_Py_from_JSprimitive + 179 
(spidermonkey.c:4955)
3   spidermonkey.so                 0x000000010051f935 
__pyx_f_12spidermonkey_Py_from_JS + 83 
(spidermonkey.c:5018)
4   spidermonkey.so                 0x0000000100520233 
__pyx_f_12spidermonkey_7Context_eval_script + 1455 
(spidermonkey.c:2448)
5   org.python.python               0x00000001000891df PyEval_EvalFrameEx + 15001
6   org.python.python               0x000000010008accf PyEval_EvalCodeEx + 1803
7   org.python.python               0x000000010008ad62 PyEval_EvalCode + 54
8   org.python.python               0x00000001000a265a Py_CompileString + 78
9   org.python.python               0x00000001000a44dd PyRun_InteractiveOneFlags 
+ 503
10  org.python.python               0x00000001000a4615 
PyRun_InteractiveLoopFlags + 206
11  org.python.python               0x00000001000a4685 PyRun_AnyFileExFlags + 76
12  org.python.python               0x00000001000b0286 Py_Main + 2718
13  org.python.python.app           0x0000000100000e6c start + 52

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00000000008acc00  rbx: 0x0000000100277eb0  rcx: 0x00007fff70b5b5d0  rdx: 
0x00000000008acc00
  rdi: 0x00000000008acde0  rsi: 0x00000000008acde4  rbp: 0x00007fff5fbfedf0  rsp: 0x00007fff5fbfedd0
   r8: 0x0000000000000000   r9: 0x00000001002905c0  r10: 0x0000000000000000  r11: 
0x0000000000000017
  r12: 0x0000000100123100  r13: 0x00000001006bb6c8  r14: 0x0000000100123100  r15: 
0x00000001006b88c0
  rip: 0x000000010058b778  rfl: 0x0000000000010206  cr2: 0x00000000008acc00

Binary Images:
       0x100000000 -        0x100000ff7  org.python.python.app 2.6 (2.6) <BDEA119D-4E2F-D97F-07BA-
713A6E5A39B6> 
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Co
ntents/MacOS/Pytho
n
       0x100004000 -        0x100114ff7  org.python.python 2.6.1 (2.6.1) <01EBD0D4-F181-045F-C7A8-
B7B3C5D4204F> /System/Library/Frameworks/Python.framework/Versions/2.6/Python
       0x1001f0000 -        0x1001f2ff7  readline.so ??? (???) <A8236667-A9DD-30A5-6DE8-201C6EF317E6> 
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/readline.so
       0x1001f8000 -        0x1001fbff7  strop.so ??? (???) <E67EF470-D9DD-D2B9-8BEE-CBD7AF9A1D64> 
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/strop.so
       0x1004f0000 -        0x10050cff7  libedit.2.dylib ??? (???) <F9D005F8-74B8-CC05-2697-
24C49E0CC1EF> /usr/lib/libedit.2.dylib
       0x10051b000 -        0x100530ff7 +spidermonkey.so ??? (???) <5349F163-0E4B-B9DA-7F7E-
E6A0B1E32A3C> /Library/Python/2.6/site-packages/spidermonkey.so
       0x10053d000 -        0x100654fef +libjs.dylib ??? (???) <75B3D786-F35E-CCE5-FDF2-8AEF54E92B48> 
/usr/local/spidermonkey/lib/libjs.dylib
       0x1006dd000 -        0x1006e0fff  operator.so ??? (???) <68C1CC88-5F73-E029-5C19-685BBADACFA6> 
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/operator.so
       0x1006e6000 -        0x1006e9fff  _collections.so ??? (???) <1F62A5C3-6E6C-D0BC-7AA6-
DA2820B5F157> 
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-
dynload/_collections.so
       0x10072f000 -        0x100730fff  cStringIO.so ??? (???) <7600C3A8-3C81-2A81-0853-B09107768C8C> 
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynlo
ad/cStringIO.so
    0x7fff5fc00000 -     0x7fff5fc3bdef  dyld 132.1 (???) <B633F790-4DDB-53CD-7ACF-2A3682BCEA9F> 
/usr/lib/dyld
    0x7fff803e5000 -     0x7fff80424fef  libncurses.5.4.dylib ??? (???) <E0A07C12-D912-DF26-9E38-
C50484D96EB0> /usr/lib/libncurses.5.4.dylib
    0x7fff837e9000 -     0x7fff837edff7  libmathCommon.A.dylib ??? (???) <95718673-FEEE-B6ED-B127-
BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
    0x7fff86086000 -     0x7fff86245fe7  libSystem.B.dylib ??? (???) <1AABDC4B-CBAE-F40C-405C-
DAE785959F57> /usr/lib/libSystem.B.dylib
    0x7fff866f9000 -     0x7fff86776fef  libstdc++.6.dylib ??? (???) <35ECA411-2C08-FD7D-11B1-
1B7A04921A5C> /usr/lib/libstdc++.6.dylib
    0x7fffffe00000 -     0x7fffffe01fff  libSystem.B.dylib ??? (???) <1AABDC4B-CBAE-F40C-405C-
DAE785959F57> /usr/lib/libSystem.B.dylib

Model: iMac8,1, BootROM IM81.00C1.B00, 2 processors, Intel Core 2 Duo, 2.8 GHz, 
4 GB, SMC 1.30f1
Graphics: ATI Radeon HD 2600 Pro, ATI Radeon HD 2600 Pro, PCIe, 256 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8C), Broadcom 
BCM43xx 1.0 (5.10.91.19)
Bluetooth: Version 2.2.0f18, 2 service, 1 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: Hitachi HDP725032GLA380, 298.09 GB
Parallel ATA Device: MATSHITADVD-R   UJ-875
USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8502, 0xfd400000
USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x5d100000
USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x1a100000
USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x820f, 
0x1a110000
FireWire Device: 1394A/USB2.0/eSATA combo drive 00, PI-208, Up to 400 Mb/sec

Original comment by wjia...@gmail.com on 8 Sep 2009 at 11:37

GoogleCodeExporter commented 9 years ago
I'm seeing the same thing, even a simple function such as:

function run() { 
    return 12;
}

will segfault  

Original comment by smcal...@gmail.com on 4 Nov 2009 at 4:16

GoogleCodeExporter commented 9 years ago
I have Pyrex 0.99 and Python 2.6 on snow leopard, and pyrex doesn't seems to 
compile the spidermonkey file 
and produce an empty spidermonkey.c file.

Original comment by overbom...@gmail.com on 4 May 2010 at 4:39