php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lucas at lucaswoj dot com
New email:
PHP Version: OS:

 

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

Reproduce code:
---------------
<?php

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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:01 UTC] kalle@php.net
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: Sat Apr 27 13:01:30 2024 UTC