Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40931 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64615 invoked from network); 10 Oct 2008 17:46:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2008 17:46:07 -0000 Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.226 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 64.233.184.226 wr-out-0506.google.com Received: from [64.233.184.226] ([64.233.184.226:19552] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/99-38373-DD49FE84 for ; Fri, 10 Oct 2008 13:46:06 -0400 Received: by wr-out-0506.google.com with SMTP id 68so383714wri.15 for ; Fri, 10 Oct 2008 10:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=I9eZkyA4F0TFLlSv1pgqN8afxt+r0vPSl6WtvZnY9mc=; b=Vys3MWFVHz1m2WeIlle5giPfamHl7+bDMExjV8KbSL6t+IfNWVhN/AoW7ovqUY1mNZ MAlldKRSlxmPPBPxlxkojbkvdGGOxiWvoYE1bSepiK5QDdXJqWLgumF5wsrcSRsNxzV4 8E1Vx8oNCOUN3RQexEM2p0aoO20Kv71CVv8L8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=iiOFfplkmGKeE8YkdIk068K590xeAtzyy2fwnk+/9yu8frriON5PNPLvd+PU8V/sQG ZLQ/sKABXrCVa6X3vqVT/W3dTTMSPXDn6zsfsH7xD6VM5qQz+94es0kEVVlxIdYIPWOL tDsvF9GYX3V6V8w2Xws7+eL9U9gduy7y1xxuE= Received: by 10.90.98.12 with SMTP id v12mr2049113agb.40.1223660762545; Fri, 10 Oct 2008 10:46:02 -0700 (PDT) Received: from ?10.0.18.8? (ns.fioprev.org.br [157.86.206.62]) by mx.google.com with ESMTPS id 39sm2195216agb.23.2008.10.10.10.46.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 10 Oct 2008 10:46:01 -0700 (PDT) To: Olivier Bonvalet Cc: internals@lists.php.net In-Reply-To: <48EF89BD.5030904@daevel.fr> References: <48EF89BD.5030904@daevel.fr> Content-Type: text/plain; charset=utf-8 Date: Fri, 10 Oct 2008 14:45:57 -0300 Message-ID: <1223660757.5363.3.camel@felipe> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] segfault after an "invalid read of size 8" From: felipensp@gmail.com (Felipe Pena) Em Sex, 2008-10-10 às 18:58 +0200, Olivier Bonvalet escreveu: > Hello, > > I have a script which throw a segfault, in cli with PHP 5.2.6 (I just > recompiled it from source). > > I track the error with valgrind, and obtain this as a result : > ==17069== Invalid read of size 8 > ==17069== at 0x6CBCAC: _zend_mm_alloc_int (zend_alloc.c:1767) > ==17069== by 0x6CC1DF: _estrndup (zend_alloc.c:2422) > ==17069== by 0x6EFFDC: add_assoc_string_ex (zend_API.c:1038) > ==17069== by 0x567027: zif_posix_uname (posix.c:466) > ==17069== by 0x71E3AC: zend_do_fcall_common_helper_SPEC > (zend_vm_execute.h:200) > ==17069== by 0x709983: execute (zend_vm_execute.h:92) > ==17069== by 0x6DA134: zend_call_function (zend_execute_API.c:1013) > ==17069== by 0x6DB1C5: call_user_function_ex (zend_execute_API.c:640) > ==17069== by 0x6DB241: call_user_function (zend_execute_API.c:613) > ==17069== by 0x627D1A: user_shutdown_function_call > (basic_functions.c:5311) > ==17069== by 0x6F133A: zend_hash_apply (zend_hash.c:673) > ==17069== by 0x627FD5: php_call_shutdown_functions > (basic_functions.c:5395) > ==17069== Address 0x61 is not stack'd, malloc'd or (recently) free'd > ==17069== > ==17069== Process terminating with default action of signal 11 (SIGSEGV) > ==17069== Access not within mapped region at address 0x61 > ==17069== at 0x6CBCAC: _zend_mm_alloc_int (zend_alloc.c:1767) > ==17069== by 0x6CC1DF: _estrndup (zend_alloc.c:2422) > ==17069== by 0x6EFFDC: add_assoc_string_ex (zend_API.c:1038) > ==17069== by 0x567027: zif_posix_uname (posix.c:466) > ==17069== by 0x71E3AC: zend_do_fcall_common_helper_SPEC > (zend_vm_execute.h:200) > ==17069== by 0x709983: execute (zend_vm_execute.h:92) > ==17069== by 0x6DA134: zend_call_function (zend_execute_API.c:1013) > ==17069== by 0x6DB1C5: call_user_function_ex (zend_execute_API.c:640) > ==17069== by 0x6DB241: call_user_function (zend_execute_API.c:613) > ==17069== by 0x627D1A: user_shutdown_function_call > (basic_functions.c:5311) > ==17069== by 0x6F133A: zend_hash_apply (zend_hash.c:673) > ==17069== by 0x627FD5: php_call_shutdown_functions > (basic_functions.c:5395) > ==17069== > ==17069== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 66 from 4) > ==17069== malloc/free: in use at exit: 2,641,381 bytes in 12,114 blocks. > ==17069== malloc/free: 13,138 allocs, 1,024 frees, 7,178,514 bytes > allocated. > ==17069== For counts of detected errors, rerun with: -v > ==17069== searching for pointers to 12,114 not-freed blocks. > ==17069== checked 2,442,920 bytes. > ==17069== > ==17069== LEAK SUMMARY: > ==17069== definitely lost: 292 bytes in 11 blocks. > ==17069== possibly lost: 0 bytes in 0 blocks. > ==17069== still reachable: 2,641,089 bytes in 12,103 blocks. > ==17069== suppressed: 0 bytes in 0 blocks. > ==17069== Rerun with --leak-check=full to see details of leaked memory. > > Should I try to reduce the size of the PHP script (actually it use a > framework) to can reproduce the problem ; or is this output of valgrind > is enough ? > Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi In case of segfaulting with the latest version, file a bug at http://bugs.php.net Thanks. :) -- Regards, Felipe Pena