|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59871 Segfault when using 'exit'
Submitted: 2011-07-25 05:29 UTC Modified: 2017-01-10 08:00 UTC
From: lior dot kuyer at gfk dot com Assigned:
Status: Suspended Package: spidermonkey (PECL)
PHP Version: 5.3.3 OS: SUSE Linux Enterprise Server 11
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
22 + 3 = ?
Subscribe to this entry?

 [2011-07-25 05:29 UTC] lior dot kuyer at gfk dot com
Using an exit in your code causes a segfault. Before the segfault, the JS api throws an error saying "1 contexts left in runtime upon JS_DestroyRuntime"

Reproduce code:
echo "start\n";
$js = new JSContext();
echo "finish\n";

Expected result:

Actual result:
JS API usage error: 1 contexts left in runtime upon JS_DestroyRuntime.
JS engine warning: leaking GC root 'res->input' at 0x203be10
JS engine warning: 1 GC root remains after destroying the JSRuntime.
This root may point to freed memory. Objects reachable through it have not been finalized.
Segmentation fault


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-18 06:11 UTC] lior dot kuyer at gfk dot com
Fixed in spidermonkey extension and mailed the developer with a patch.
 [2017-01-10 08:00 UTC]
-Status: Open +Status: Suspended
 [2017-01-10 08:00 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: Wed Sep 27 06:01:24 2023 UTC