|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53479 Eval triggers segmentation fault when argument is a string returned by sprintf
Submitted: 2010-12-06 03:43 UTC Modified: 2013-02-18 00:34 UTC
From: Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.3.3 OS: 2.6.32-25-generic #45-Ubuntu SMP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2010-12-06 03:43 UTC]
eval(), when provided with a parameter string returned by the sprintf() function, 
causes the PHP script (in console at least) to crash with a segmentation fault.

Test script:
// Crashes
eval(sprintf('class Roger {}'));

// Does not crash
eval('class Roger {}');

Expected result:
No segfaulting.

Actual result:
Segmentation fault


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-06 09:10 UTC]
-Status: Open +Status: Feedback
 [2010-12-06 09:10 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Works for me. Please also try a snapshot.
 [2011-01-04 21:44 UTC] daniel at ozonesolutions dot com
We had a similar problem and found that disabling x-debug fixed it.  I don't know if you had it installed, but it is worth a try.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 16:01:31 2024 UTC