|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35939 SPL ArrayObject segmentation fault when more than one parameters passed
Submitted: 2006-01-09 09:11 UTC Modified: 2006-01-10 07:11 UTC
From: lynjwxm at hotmail dot com Assigned: helly (profile)
Status: Closed Package: SPL related
PHP Version: php5-STABLE-200509220445 OS: *
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: lynjwxm at hotmail dot com
New email:
PHP Version: OS:


 [2006-01-09 09:11 UTC] lynjwxm at hotmail dot com
If you give more than one parameters to function ArrayObject::__construct(),it really crashed.I know I did not use this function correctly, but I did not expect the segmentation fault. I expect a warning of uncaught exception not a seg fault.

Reproduce code:
//try{  //comment exception catcher cause crash.
        $obj=new ArrayObject($test,5);
//}catch(Exception $e)
        echo "exception protect you.\n";;

Expected result:
anything other than crash

Actual result:
segmentation fault


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-09 09:19 UTC]
Marcus, latest CVS does not crash but doesn't give any error either. Intentional or not?
 [2006-01-09 20:46 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.

I cannot reproduce this and valgrind doesn't find anything. So please update to 5.1.2-RC2 and test again. If it still happens send me a backtrace as explained above.
 [2006-01-10 07:11 UTC] lynjwxm at hotmail dot com
I am sorry that I made a mistake about the version of php with which I produced this defect. I use php5-STABLE-200509220445 to do so. I download the latest php-5.1.2RC1 only to find it has gone. Still need backtrace?
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 15:05:53 2022 UTC