Here a script parsed through valgrind.
It's related to the gettext extension.
It is not the segfault I search, so I continue to search zend related bug.

Jean-Pierre

<?php

// Prerequisite:
// 1. Copy some .mo file from your system to /tmp/fr_FR/LC_MESSAGES/run.mo
// 2. ./configure --with-gettext  GetText Support: enabled

setlocale(LC_MESSAGES,'fr_FR');
bindtextdomain('run','/tmp');
textdomain('run');

echo "\n";
echo gettext('AZERTY'); // The file run.mo must exists but the string not
echo "\n";

?>

==13278== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==13278== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==13278== Using valgrind-2.0.0, a program supervision framework for
x86-linux.
==13278== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==13278== Command line:
==13278==    php
==13278==    bug_php_4.php
==13278== Startup, with flags:
==13278==    --suppressions=/usr/local/lib/valgrind/default.supp
==13278==    -v
==13278== Reading syms from /usr/local/bin/php
==13278== Reading syms from /lib/ld-2.2.4.so
==13278== Reading syms from /usr/local/lib/valgrind/vgskin_memcheck.so
==13278== Reading syms from /usr/local/lib/valgrind/valgrind.so
==13278== Reading syms from /lib/libcrypt-2.2.4.so
==13278== Reading syms from /lib/libpam.so.0.75
==13278==    object doesn't have any debug info
==13278== Reading syms from /usr/lib/libpng.so.2.1.0.14
==13278==    object doesn't have a symbol table
==13278==    object doesn't have any debug info
==13278== Reading syms from /usr/lib/libz.so.1.1.4
==13278==    object doesn't have any debug info
==13278== Reading syms from /lib/libdl-2.2.4.so
==13278== Reading syms from /usr/lib/libbz2.so.1.0.0
==13278==    object doesn't have any debug info
==13278== Reading syms from /lib/libresolv-2.2.4.so
==13278== Reading syms from /lib/i686/libm-2.2.4.so
==13278== Reading syms from /lib/libnsl-2.2.4.so
==13278== Reading syms from /usr/local/lib/libcurl.so.2.0.2
==13278== Reading syms from /lib/libssl.so.0.9.6b
==13278==    object doesn't have any debug info
==13278== Reading syms from /lib/libcrypto.so.0.9.6b
==13278==    object doesn't have any debug info
==13278== Reading syms from /lib/i686/libc-2.2.4.so
==13278== Reading suppressions file: /usr/local/lib/valgrind/default.supp
==13278== Estimated CPU clock rate is 1615 MHz
==13278==
==13278== Reading syms from /lib/libnss_files-2.2.4.so

==13278== Reading syms from /usr/lib/gconv/ISO8859-1.so
==13278==    object doesn't have a symbol table
==13278==    object doesn't have any debug info
==13278== Reading syms from /usr/lib/gconv/ISO8859-15.so
==13278==    object doesn't have a symbol table
==13278==    object doesn't have any debug info
AZERTY
==13278== Invalid read of size 4
==13278==    at 0x4050673F: trecurse (tsearch.c:600)
==13278==    by 0x4050669D: __twalk (tsearch.c:609)
==13278==    by 0x4043F6AA: __gconv_release_shlib (gconv_dl.c:189)
==13278==    by 0x40438729: __gconv_close_transform (gconv_db.c:196)
==13278==    Address 0x426419F8 is 4 bytes inside a block of size 16 free'd
==13278==    at 0x4002BE5B: free (vg_replace_malloc.c:231)
==13278==    by 0x405067F1: tdestroy_recurse (tsearch.c:644)
==13278==    by 0x40506709: __tdestroy (tsearch.c:641)
==13278==    by 0x4043F754: free_mem (gconv_dl.c:209)
==13278==
==13278== Invalid read of size 4
==13278==    at 0x40506798: trecurse (tsearch.c:612)
==13278==    by 0x4050669D: __twalk (tsearch.c:609)
==13278==    by 0x4043F6AA: __gconv_release_shlib (gconv_dl.c:189)
==13278==    by 0x40438729: __gconv_close_transform (gconv_db.c:196)
==13278==    Address 0x426419FC is 8 bytes inside a block of size 16 free'd
==13278==    at 0x4002BE5B: free (vg_replace_malloc.c:231)
==13278==    by 0x405067F1: tdestroy_recurse (tsearch.c:644)
==13278==    by 0x40506709: __tdestroy (tsearch.c:641)
==13278==    by 0x4043F754: free_mem (gconv_dl.c:209)
==13278==
==13278== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 32 from 4)
==13278==
==13278== 2 errors in context 1 of 2:
==13278== Invalid read of size 4
==13278==    at 0x40506798: trecurse (tsearch.c:612)
==13278==    by 0x4050669D: __twalk (tsearch.c:609)
==13278==    by 0x4043F6AA: __gconv_release_shlib (gconv_dl.c:189)
==13278==    by 0x40438729: __gconv_close_transform (gconv_db.c:196)
==13278==    Address 0x426419FC is 8 bytes inside a block of size 16 free'd
==13278==    at 0x4002BE5B: free (vg_replace_malloc.c:231)
==13278==    by 0x405067F1: tdestroy_recurse (tsearch.c:644)
==13278==    by 0x40506709: __tdestroy (tsearch.c:641)
==13278==    by 0x4043F754: free_mem (gconv_dl.c:209)
==13278==
==13278== 2 errors in context 2 of 2:
==13278== Invalid read of size 4
==13278==    at 0x4050673F: trecurse (tsearch.c:600)
==13278==    by 0x4050669D: __twalk (tsearch.c:609)
==13278==    by 0x4043F6AA: __gconv_release_shlib (gconv_dl.c:189)
==13278==    by 0x40438729: __gconv_close_transform (gconv_db.c:196)
==13278==    Address 0x426419F8 is 4 bytes inside a block of size 16 free'd
==13278==    at 0x4002BE5B: free (vg_replace_malloc.c:231)
==13278==    by 0x405067F1: tdestroy_recurse (tsearch.c:644)
==13278==    by 0x40506709: __tdestroy (tsearch.c:641)
==13278==    by 0x4043F754: free_mem (gconv_dl.c:209)
--13278-- 
--13278-- supp:    9 _dl_relocate_object/libc-2.2.4.so/_dl_catch_error(Cond)
--13278-- supp:    9 do_release_shlib/__twalk(Addr4)
--13278-- supp:    8 __twalk/*(Addr4)
--13278-- supp:    6 do_release_shlib/trecurse(Addr4)
==13278==
==13278== IN SUMMARY: 4 errors from 2 contexts (suppressed: 32 from 4)
==13278==
==13278== malloc/free: in use at exit: 2375 bytes in 17 blocks.
==13278== malloc/free: 16391 allocs, 16374 frees, 3273452 bytes allocated.
==13278==
--13278--     TT/TC: 0 tc sectors discarded.
--13278--            9775 chainings, 0 unchainings.
--13278-- translate: new     13279 (220792 -> 3115845; ratio 141:10)
--13278--            discard 0 (0 -> 0; ratio 0:10).
--13278--  dispatch: 6550000 jumps (bb entries), of which 756986 (11%) were
unchained.
--13278--            133/51027 major/minor sched events.  18263 tt_fast
misses.
--13278-- reg-alloc: 2220 t-req-spill, 587300+10728 orig+spill uis, 67066
total-reg-r.
--13278--    sanity: 134 cheap, 6 expensive checks.
--13278--    ccalls: 75352 C calls, 62% saves+restores avoided (278928
bytes)
--13278--            98970 args, avg 0.89 setup instrs each (20838 bytes)
--13278--            0% clear the stack (226056 bytes)
--13278--            22062 retvals, 30% of reg-reg movs avoided (13188
bytes)



----- Original Message ----- 
From: "Ilia Alshanetsky" <[EMAIL PROTECTED]>
To: "Jean-Pierre Arneodo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 4:39 PM
Subject: Re: [PHP-DEV] Segmentation fault in php4-STABLE-200311270830


> Could you please supply the PHP script used?
>
> Ilia

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to