#25620 [Opn->Fbk]: Crash / "String is not zero-terminated"
| From: | sniper@php.net | Date: | Sat, 27 Sep 2003 17:20:20 +0000 |
| Subject: | #25620 [Opn->Fbk]: Crash / "String is not zero-terminated" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48186@lists.php.net to get a copy of this message | ||
ID: 25620
Updated by: sniper@php.net
Reported By: xris at farcaster dot net
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: GNU/Linux 2.4.20
PHP Version: 4.3.4-dev
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-09-27 12:07:11] xris at farcaster dot net
So far i checked 600 methods, but could'nt find any
return's similar to your examples. What about these
constructs, are they known to cause heap corruption, too?
// Example 1
function &return_ref_constant() {
return FALSE; // or "return (1<2):"
}
// Example 2
function &a() {
return $b
}
function &return_ref_method() {
return $this->a();
}
// Example 3
function &return_ref_array() {
return array();
}
Yes, i know, some of them are "wrong".
------------------------------------------------------------------------
[2003-09-27 11:00:41] moriyoshi@php.net
Seems to me the same issue addressed in bug #22510. I suspect you are
trying to return a value by reference that is not originated from a
variable somewhere in a function. That is,
function &return_ref_a() {
return $a + $b;
}
function &return_ref_b() {
return @$a;
}
function &return_ref_c() {
return -$a;
}
None of the above examples don't actually work, which are verified to
cause random heap corruption. Please check if such an error is
somewhere in your code.
------------------------------------------------------------------------
[2003-09-27 09:22:58] xris at farcaster dot net
Rechecked both strings; "SetVerband" is definitely a method (theres no
other usage of this string in the whole system), but "Bundesland" is a
variable (i replaced all '$Bundesland' variables with '$dnalsednuB').
I'll try to identify the
offending usage of this var, but there are 146 places where
such a variable name is used. In almost all cases, $Bundesland contains
a class, though..
------------------------------------------------------------------------
[2003-09-27 08:58:34] xris at farcaster dot net
> Don't you KNOW what that file has in it???
well.. actually.. it's not that simple.
As i stated on various occasions, our code is quite complex. We are
using a self-made on demand dynamic class loading system. But as you
mention it, i could propably modify the
class loader to generate one huge script containg the
complete code which would otherwise just be include()d.
To answer the question: i do have methods called like these,
but "Bundesland" might be an ordinary string, a var or
anything. i'll check, but i'm pretty sure it's a method.
- bison (GNU Bison) 1.35
- flex version 2.5.4
------------------------------------------------------------------------
[2003-09-27 08:43:22] sniper@php.net
"Most likely class methods" ?!?! Don't you KNOW what that file has in
it??? (in latter case, htdocs/sport/auswahl.php)
Put it online (as .txt) so we can actually see what's in it.
Also, what do these output:
# bison --version
# flex --version
------------------------------------------------------------------------
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/25620
--
Edit this bug report at http://bugs.php.net/?id=25620&edit=1