ID: 36412 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Strings related Operating System: linux PHP Version: 5CVS-2006-02-16 (CVS) New Comment:
Just for the record: not reproducible on machines I have around here (glibc 2.3.2/2.3.3/2.3.4). Seems like glibc (or glibc-related) issue. Previous Comments: ------------------------------------------------------------------------ [2006-02-16 10:36:51] [EMAIL PROTECTED] Description: ------------ basename("gpg") has valgrind errors, and for some reason uses mblen()... Reproduce code: --------------- valgrind --num-callers=24 php -r 'echo basename("gpg");' Actual result: -------------- ==27568== Invalid read of size 4 ==27568== at 0x4010FE7: (within /lib/ld-2.3.5.so) ==27568== by 0x400AFA9: (within /lib/ld-2.3.5.so) ==27568== by 0x4007DBD: (within /lib/ld-2.3.5.so) ==27568== by 0x45F3A6B: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x400B056: (within /lib/ld-2.3.5.so) ==27568== by 0x45F3BED: __libc_dlsym (in /lib/tls/libc-2.3.5.so) ==27568== by 0x450B54D: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x450ABD8: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x450B0E8: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x45037E0: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x456C538: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x4560DE5: mbrtowc (in /lib/tls/libc-2.3.5.so) ==27568== by 0x4518900: mblen (in /lib/tls/libc-2.3.5.so) ==27568== by 0x8300751: php_basename (string.c:1132) ==27568== by 0x8300921: zif_basename (string.c:1200) ==27568== by 0x83BE29C: execute_internal (zend_execute.c:1368) ==27568== by 0x497B40E: xdebug_execute_internal (xdebug.c:1375) ==27568== by 0x83BE83D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:194) ==27568== by 0x83C3A33: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1587) ==27568== by 0x83BE470: execute (zend_vm_execute.h:92) ==27568== by 0x497B0AA: xdebug_execute (xdebug.c:1313) ==27568== by 0x8394678: zend_eval_string (zend_execute_API.c:1091) ==27568== by 0x83947CA: zend_eval_string_ex (zend_execute_API.c:1125) ==27568== by 0x840F3DA: main (php_cli.c:1129) ==27568== Address 0x4B08A9C is 28 bytes inside a block of size 29 alloc'd ==27568== at 0x401B41A: malloc (vg_replace_malloc.c:149) ==27568== by 0x4003D27: (within /lib/ld-2.3.5.so) ==27568== by 0x40064DA: (within /lib/ld-2.3.5.so) ==27568== by 0x45F1B2F: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x400B056: (within /lib/ld-2.3.5.so) ==27568== by 0x45F24EA: _dl_open (in /lib/tls/libc-2.3.5.so) ==27568== by 0x45F39FC: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x400B056: (within /lib/ld-2.3.5.so) ==27568== by 0x45F3B5D: __libc_dlopen_mode (in /lib/tls/libc-2.3.5.so) ==27568== by 0x450B4FA: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x450ABD8: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x450B0E8: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x45037E0: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x456C538: (within /lib/tls/libc-2.3.5.so) ==27568== by 0x4560DE5: mbrtowc (in /lib/tls/libc-2.3.5.so) ==27568== by 0x4518900: mblen (in /lib/tls/libc-2.3.5.so) ==27568== by 0x8300751: php_basename (string.c:1132) ==27568== by 0x8300921: zif_basename (string.c:1200) ==27568== by 0x83BE29C: execute_internal (zend_execute.c:1368) ==27568== by 0x497B40E: xdebug_execute_internal (xdebug.c:1375) ==27568== by 0x83BE83D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:194) ==27568== by 0x83C3A33: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1587) ==27568== by 0x83BE470: execute (zend_vm_execute.h:92) ==27568== by 0x497B0AA: xdebug_execute (xdebug.c:1313) (turning off xdebug doesn't make a difference) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36412&edit=1