Bug #69320 [NEW]: libmagic crash when running laravel tests

From: Date: Sat, 28 Mar 2015 18:29:01 +0000
Subject: Bug #69320 [NEW]: libmagic crash when running laravel tests
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191663@lists.php.net to get a copy of this message
From: nikic Operating system: PHP version: master-Git-2015-03-28 (Git) Package: Reproducible crash Bug Type: Bug Bug description:libmagic crash when running laravel tests Description: ------------ Running phpunit --filter FilesystemTest::testMimeTypeOutputsMimeType on https://github.com/laravel/framework results in a libmagic crash: #0 __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:116 #1 0x0000000000928a4a in _estrndup (s=0x7fffef91350a "", length=18446744073709551615, __zend_filename=0xdb5028 "/home/nikic/php-src/ext/fileinfo/libmagic/softmagic.c", __zend_lineno=2017, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /home/nikic/php-src/Zend/zend_alloc.c:2328 #2 0x000000000062cbdd in magiccheck (ms=0x7fffef8c5700, m=0xd4cae0 <php_magic_database+2639712>) at /home/nikic/php-src/ext/fileinfo/libmagic/softmagic.c:2017 #3 0x000000000062818d in match (ms=0x7fffef8c5700, magic=0xac8478 <php_magic_database+248>, nmagic=10786, s=0x7fffef913508 "", nbytes=3, offset=0, mode=64, text=1, flip=0, indir_level=0, name_count=0x7fffffff9b9a, printed_something=0x7fffffff9b9c, need_separator=0x7fffffff9ba0, returnval=0x7fffffff9adc) at /home/nikic/php-src/ext/fileinfo/libmagic/softmagic.c:202 #4 0x0000000000627ed0 in file_softmagic (ms=0x7fffef8c5700, buf=0x7fffef913508 "", nbytes=3, indir_level=0, name_count=0x7fffffff9b9a, mode=64, text=1) at /home/nikic/php-src/ext/fileinfo/libmagic/softmagic.c:94 #5 0x000000000061e77c in file_ascmagic_with_encoding (ms=0x7fffef8c5700, buf=0x7fffef601000 "foo", nbytes=3, ubuf=0x13e88e0, ulen=3, code=0xdb4354 "ASCII", type=0xdb4340 "text", text=1) at /home/nikic/php-src/ext/fileinfo/libmagic/ascmagic.c:149 #6 0x000000000061e592 in file_ascmagic (ms=0x7fffef8c5700, buf=0x7fffef601000 "foo", nbytes=3, text=1) at /home/nikic/php-src/ext/fileinfo/libmagic/ascmagic.c:92 #7 0x0000000000624e99 in file_buffer (ms=0x7fffef8c5700, stream=0x7fffef880100, inname=0x0, buf=0x7fffef601000, nb=3) at /home/nikic/php-src/ext/fileinfo/libmagic/funcs.c:264 #8 0x0000000000625fe1 in file_or_stream (ms=0x7fffef8c5700, inname=0x0, stream=0x7fffef880100) at /home/nikic/php-src/ext/fileinfo/libmagic/magic.c:410 #9 0x0000000000625d94 in magic_stream (ms=0x7fffef8c5700, stream=0x7fffef880100) at /home/nikic/php-src/ext/fileinfo/libmagic/magic.c:347 #10 0x000000000061749b in _php_finfo_get_type (execute_data=0x7ffff181a890, return_value=0x7ffff181a880, mode=2, mimetype_emu=0) at /home/nikic/php-src/ext/fileinfo/fileinfo.c:549 #11 0x000000000061768d in zif_finfo_file (execute_data=0x7ffff181a890, return_value=0x7ffff181a880) at /home/nikic/php-src/ext/fileinfo/fileinfo.c:587 #12 0x00000000009c21f2 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at /home/nikic/php-src/Zend/zend_vm_execute.h:691 #13 0x00000000009c1232 in execute_ex (ex=0x7ffff181a5d0) at /home/nikic/php-src/Zend/zend_vm_execute.h:394 #14 0x0000000000949fbe in zend_call_function (fci=0x7fffffffa3c0, fci_cache=0x7fffffffa390) at /home/nikic/php-src/Zend/zend_execute_API.c:875 #15 0x000000000073b765 in zim_reflection_method_invokeArgs (execute_data=0x7ffff181a550, return_value=0x7ffff181a250) at /home/nikic/php-src/ext/reflection/php_reflection.c:3044 #16 0x00000000009c2915 in ZEND_DO_FCALL_SPEC_HANDLER () at /home/nikic/php-src/Zend/zend_vm_execute.h:827 #17 0x00000000009c1232 in execute_ex (ex=0x7ffff1816030) at /home/nikic/php-src/Zend/zend_vm_execute.h:394 #18 0x00000000009c14a5 in zend_execute (op_array=0x7ffff1885000, return_value=0x0) at /home/nikic/php-src/Zend/zend_vm_execute.h:434 #19 0x00000000009637c3 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/nikic/php-src/Zend/zend.c:1355 (gdb) f 2 (gdb) p *ms $2 = {mlist = {0x7fffef8b5d70, 0x7fffef8b5d20}, c = {len = 10, li = 0x7fffef8dd9c0}, o = { buf = 0x0, pbuf = 0x0}, offset = 2, error = -1, flags = 16, event_flags = 0, file = 0xdb2545 "unknown", line = 250, search = {s = 0x7fffef91350a "", s_len = 18446744073709551615, offset = 2, rm_len = 0}, ms_value = {b = 102 'f', h = 28518, l = 7303014, q = 7303014, hs = "fo", hl = "foo", hq = "foo\000\000\000\000", s = "foo", '\000' <repeats 60 times>, us = "foo", '\000' <repeats 60 times>, f = 1,02337023e-38, d = 3,6081683284976653e-317}, indir_max = 15, name_max = 30, elf_shnum_max = 32768, elf_phnum_max = 128, elf_notes_max = 256} -- Edit bug report at https://bugs.php.net/bug.php?id=69320&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69320&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69320&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69320&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69320&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69320&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69320&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69320&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69320&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69320&r=support Expected behavior: https://bugs.php.net/fix.php?id=69320&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69320&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69320&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69320&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69320&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69320&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69320&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69320&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69320&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69320&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69320&r=mysqlcfg

« previous php.bugs (#191663) next »