ID: 32963 User updated by: Jason at hybd dot net Reported By: Jason at hybd dot net Status: Open Bug Type: Reproducible crash Operating System: CentOS 4 / RHEL 3 PHP Version: 5CVS-2005-05-06 (dev) New Comment:
Hi Derick, You're a ledgend! I was having to do some changes to some of the code that was crashing. Funnily enough I changed some and decided I'd use a reference to an array element. All of a sudden the segfaults returned, and I did a backtrace on our live server (for some reason, probably relating to my clumsiness, the test box doesn't give us backtraces despite compiling with --enable-debug). The backtrace gives exactly the same results. It seems the segfault does not happen though until further down in the program. I would guess it does it where some of the ArrayAccess stuff is used. I'll see if I can develop a test script again to reproduce this bug, now I have a clearer idea what seems to be causing it. Previous Comments: ------------------------------------------------------------------------ [2005-05-10 11:30:58] Jason at hybd dot net in what way? In the template system I started to play about with, I did use reference operators explictly, much like PHP4. However, since then I haven't used them in other bits of code. I did find that occasionally that using the reference operators did screw things up a while back, and I have had issues such as the one in at http://bugs.php.net/bug.php?id=32745. However the points in which I have used the reference operator, they have nearly always been dealing with objects, and not POD types such as string/int/float types, and therefore would be naturally be passed by reference regardless of there being a reference operator. Out of interest, what way do references affect things internally? ------------------------------------------------------------------------ [2005-05-09 23:11:38] [EMAIL PROTECTED] Are you using references extensively? ------------------------------------------------------------------------ [2005-05-09 19:47:01] Jason at hybd dot net There seems to be no way I can reduce this bug down to a few lines. I can only think some eariler piece of code triggers some sort of memory corruption. I've tried with a test script, fiddling about with things like scopes and making circlar references, thinking maybe that was to do with it (seeing as it's destruction call to the offset that seems to be creating the problem, from what I can make out in the src) Although I don't think it's the same thing as (Certainly I had some code that was doing what was said in these bugs, but it seems like it works now, which makes me believe the bugs below are different, although the behaviour is rather similar at times)... http://bugs.php.net/bug.php?id=30346 OR http://bugs.php.net/bug.php?id=32252 It is very similar. The issue is to do with offsetGet(). Frame 5 of the dump seems to the most likely problem area. ------------------------------------------------------------------------ [2005-05-09 15:17:20] Jason at hybd dot net In a worst case scenario (if I can't get a small test script developed), would it be OK to email you with access details to the scripts/server so you can investigate for yourself. I can give you suitable SSH access to our testing box. That way you can do what you want in the way of running gdb, recompiling etc if need be. ------------------------------------------------------------------------ [2005-05-09 11:38:38] [EMAIL PROTECTED] We can't do much without a script to reproduce it ourselves, so try come up with one.. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/32963 -- Edit this bug report at http://bugs.php.net/?id=32963&edit=1