|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59238 Segfault when storing JSContext as a static property
Submitted: 2010-05-27 17:04 UTC Modified: 2017-01-10 08:01 UTC
From: lucas at lucaswoj dot com Assigned:
Status: Suspended Package: spidermonkey (PECL)
PHP Version: 5.3.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: lucas at lucaswoj dot com
New email:
PHP Version: OS:


 [2010-05-27 17:04 UTC] lucas at lucaswoj dot com
If I try to store a JSContext object in a static class, I hit 
a segfault.

Reproduce code:

class StaticClass {

	public static $context;


StaticClass::$context = new jsContext();

echo StaticClass::$context->evaluateScript("Hello, world.");


Expected result:
Print "Hello, world."

Actual result:
Segfault (page remains blank)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-18 10:17 UTC] tianbin at cernet dot edu dot cn
this bus is caused by JS_DestroyRuntime (in function PHP_RSHUTDOWN_FUNCTION(spidermonkey)) called before JS_DestroyContext (in function php_jscontext_object_free_storage).

You can unset all the variables which references the JSContext object before php script quit to avoid this bug.
 [2017-01-10 08:01 UTC]
-Status: Open +Status: Suspended
 [2017-01-10 08:01 UTC]
Suspending this report as the extension have not had a release for almost 5 years.  Please revive this if the extension once again shows life
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 11:01:27 2024 UTC