#37950 [Com]: PHP segfaults when assigning $errcontext to Smarty var when debugging enabled
| From: | abaker_php at yahoo dot com | Date: | Thu, 04 Jan 2007 17:24:30 +0000 |
| Subject: | #37950 [Com]: PHP segfaults when assigning $errcontext to Smarty var when debugging enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107172@lists.php.net to get a copy of this message | ||
ID: 37950
Comment by: abaker_php at yahoo dot com
Reported By: bugs dot php dot net at zetafleet dot com
Status: No Feedback
Bug Type: Reproducible crash
Operating System: Linux 2.6.15 (Debian testing)
PHP Version: 5.1.4
New Comment:
This also appears in PHP 5.1.5
Previous Comments:
------------------------------------------------------------------------
[2006-07-06 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2006-06-28 16:27:20] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-06-28 16:23:37] bugs dot php dot net at zetafleet dot com
Description:
------------
When $smarty->debugging = true and using $smarty->assign
to assign a template variable with the value of
$errcontext, PHP segfaults when trying to output the
debugging console for Smarty.
Reproduce code:
---------------
<?
include('Smarty.class.php');
$smarty = new Smarty();
$smarty->debugging = true; // the error will not occur if
debugging = false
set_error_handler("error_handler",E_ALL);
function error_handler($errno, $errstr, $errfile, $errline,
$errcontext)
{
global $smarty;
$smarty->assign('killme',$errcontext);
$smarty->display('killsmarty.tpl'); // this file can be
empty but it has to exist
echo($errstr);
}
trigger_error("Uh-ho!",E_USER_ERROR);
?>
Expected result:
----------------
$errcontext should be assigned to Smarty template variable
$killme.
Actual result:
--------------
#0 0xb7a56e40 in vfprintf () from /lib/tls/libc.so.6
#1 0xb7a73ffb in vsprintf () from /lib/tls/libc.so.6
#2 0xb7a5fe1e in sprintf () from /lib/tls/libc.so.6
#3 0x08277eb1 in _convert_to_string ()
#4 0x0827f684 in zend_make_printable_zval ()
#5 0x08277a1c in concat_function ()
#6 0x082a2b7e in execute ()
#7 0x0829d9c8 in execute ()
#8 0x0829bf83 in zend_get_user_opcode_handler ()
#9 0x00000000 in ?? ()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37950&edit=1