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

 [2011-07-25 05:29 UTC] lior dot kuyer at gfk dot com
Description:
------------
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:
---------------
<?php
echo "start\n";
$js = new JSContext();
echo "finish\n";
exit;

Expected result:
----------------
start
finish

Actual result:
--------------
start
finish
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:00 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-2019 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 02:01:25 2019 UTC