Re: debugging PHP memory corruption
| From: | Matijn Woudt | Date: | Wed, 04 Jan 2012 18:03:06 +0000 |
| Subject: | Re: debugging PHP memory corruption | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316167@lists.php.net to get a copy of this message | ||
On Wed, Jan 4, 2012 at 3:34 PM, Andrew Morum <amorum@brendata.co.uk> wrote:
> We've got a problem with PHP 5.3.8 and a third party (open source)
> library (WSo2 SOAP).
>
>
>
> At some point during the request to the PHP script, some structures seem
> to be getting corrupted causing PHP to crash.
>
>
>
> Depending on the code in the PHP script, it's either crashing during in
> a print_r/var_export or crashing when the PHP shuts down (the exact
> location of the crash moves around when we alter the code).
>
>
>
> We can reprod this on Win32 and Linux now. But how can we go about
> debugging where the corruption occurred? The address of the corrupted
> data is not known until the segfault/access violation occurs so we can't
> set a watch on it (as far as we can tell).
>
>
>
> Here's what we see in the debugger on Win32:
>
>
>
>
> Any tips welcomed.
>
>
>
> Andy.
Hi Andy,
Have you tried running it with valgrind? (See [1] for tips).
Otherwise, you might have more luck at php-internals mailing list,
since it is related to PHP development if you intend to fix either PHP
or the plugin.
Matijn
[1] https://bugs.php.net/bugs-getting-valgrind-log.php