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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lior dot kuyer at gfk dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 13:01:30 2025 UTC