php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4783 segfault in page cleanup
Submitted: 2000-06-02 17:38 UTC Modified: 2002-10-01 13:08 UTC
From: dave dot dunkin at vista dot com Assigned:
Status: Not a bug Package: Reproducible Crash
PHP Version: 3.0.16 OS: RH6.2
Private report: No CVE-ID: None
 [2000-06-02 17:38 UTC] dave dot dunkin at vista dot com
PHP blows up in the function pval_destructor (variables.c) on line 72. It tries to free what it thinks is a string, but it's not null-terminated. This happens consistently on certain pages. Our pages are very complex and we do a lot of requires and includes. I stuck some code in to print out pvalue->value.str.val before it is deleted and it always blows up at the same spot on the page (or rather, as it is freeing the tokens from the page). If I comment out the section of code where it fails, it will crash later, so it appears to happen after a certain number of tokens. I can keep it from segfaulting by checking to see if the string is null-terminated before freeing it, but obviously this is avoiding the problem and results in a memory leak.

PHP 3.0.13-16
Apache 1.3.9
Linux 2.2.14
glibc 2.1.3

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 13:08 UTC] hholzgra@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC