php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62765 apc_bin_dumpfile report Fatal error when there is "goto" in function
Submitted: 2012-08-07 04:21 UTC Modified: 2012-08-10 14:32 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cfc4n at cnxct dot com Assigned: laruence (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.3.15 OS: CentOS 5.6
Private report: No CVE-ID: None
 [2012-08-07 04:21 UTC] cfc4n at cnxct dot com
Description:
------------
Request cc.php in url ,and Tt's resqone that.
Fatal error: apc_bin_dumpfile() [<a href='function.apc-bin-dumpfile'>function.apc-
bin-dumpfile</a>]: pointer to be swizzled is not within allowed memory range! 
(1b16c78 &lt; 1b1a790 &lt; 1b17d69) in (null) on 0 in /home/cfc4n/cc.php on line 3

I'm not sure whether there is a relationship between it and #BUG62757.
https://bugs.php.net/bug.php?id=62757

Test script:
---------------
file cc.php :
<?php
apc_compile_file(WWWROOT.'cfc4n.php');
apc_bin_dumpfile(array(WWWROOT.'cfc4n.php'),null,'a.bin');
?>
cfc4n.php:
<?php
function cfc4n ()
{
    goto cc;
    cc:
    return true;
}
?>

Expected result:
----------------
fie it.

Actual result:
--------------
No coredump.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-08 04:14 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=327021
Log: Attempt to fix Bug #62765 (apc_bin_dumpfile report Fatal error when there is &quot;goto&quot; in function)

Rasmus maybe you could review this patch? thanks
 [2012-08-08 04:17 UTC] laruence@php.net
fix committed,  will close this after the apc_bin author review that fix. 
thanks
 [2012-08-08 04:17 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2012-08-08 09:36 UTC] cfc4n at cnxct dot com
Confirm repaired.Thanks.
 [2012-08-08 09:37 UTC] cfc4n at cnxct dot com
-Status: Assigned +Status: Closed
 [2012-08-08 09:37 UTC] cfc4n at cnxct dot com
Confirm repaired.Thanks.
 [2012-08-08 09:45 UTC] laruence@php.net
-Status: Closed +Status: Re-Opened
 [2012-08-08 09:45 UTC] laruence@php.net
leave this open,  I will close this after confirm the fix is right :) thanks
 [2012-08-08 12:22 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=327027
Log: Better fix for #62765, sync with the similar codes in apc_compile.c (thanks to ab)
 [2012-08-10 14:32 UTC] laruence@php.net
-Status: Re-Opened +Status: Closed
 [2012-08-10 14:32 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Nov 18 23:01:35 2019 UTC