|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 09 04:03:38 2023 UTC