|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-21 08:20 UTC] jmy at morgontech dot com
[2009-08-24 16:08 UTC] mkoppanen@php.net
[2009-08-25 13:28 UTC] jmy at morgontech dot com
[2010-01-27 14:41 UTC] mkoppanen@php.net
[2010-02-28 07:11 UTC] mkoppanen@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Description: ------------ Using 5.3.0 (Release) (unable to select in dropdown), imagick 2.3.0, and ImageMagick 6.5.4-10 .. When using Imagick, I seem to be getting a segfault on code cleanup. I've narrowed this down to trimImage() (deduced by multiple executions of the code). The odd part is that the script -does- run, it specifically segfaults at the very end of the execution of the php process, after all code is complete. It's almost a non-issue, but a segfault's a segfault! Reproduce code: --------------- <?php $im = new Imagick(); $im->readImage('test.png'); // You can use any image here. $im->trimImage(0); $im->clear(); $im->destroy(); ?> Expected result: ---------------- Expected result: No error messages Actual result: -------------- (relatively brief) strace output, starting with readImage: read(4, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\226\0\0\1,\10\6\0\0\0!'J"..., 4096) = 4096 _llseek(4, 0, [0], SEEK_SET) = 0 mmap2(NULL, 26010, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7fa2000 close(4) = 0 munmap(0xb7fa9000, 4096) = 0 time(NULL) = 1250833933 mmap2(NULL, 360448, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7cec000 munmap(0xb7fa2000, 26010) = 0 unlink("/tmp/magick-XX82NVQL") = 0 unlink("/tmp/magick-XX82NVQL.cache") = -1 ENOENT (No such file or directory) unlink("/tmp/magick-XX82NVQL") = -1 ENOENT (No such file or directory) getcwd("/home/mgc/card/apps", 4096) = 20 time(NULL) = 1250833933 close(3) = 0 munmap(0xb7fac000, 4096) = 0 mmap2(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb72eb000 mprotect(0xb72eb000, 4096, PROT_NONE) = 0 clone(child_stack=0xb7ceb4a4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb7cebbd8, {entry_number:6, base_addr:0xb7cebb90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb7cebbd8) = 4626 futex(0x94bd3fc, FUTEX_WAKE_PRIVATE, 2147483647) = 0 times({tms_utime=3, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 636543659 times({tms_utime=3, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 636543659 time(NULL) = 1250833933 time(NULL) = 1250833933 futex(0x94bd3fc, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x94bdd34, FUTEX_WAKE_PRIVATE, 2147483647) = 0 munmap(0xb7cec000, 360448) = 0 close(2) = 0 close(1) = 0 munmap(0xb7faa000, 4096) = 0 close(0) = 0 munmap(0xb7fab000, 4096) = 0 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 munmap(0xe78000, 2693436) = 0 munmap(0x5dc000, 116688) = 0 munmap(0x8df000, 323516) = 0 munmap(0x338000, 1002884) = 0 munmap(0x456000, 1596752) = 0 munmap(0x42d000, 53896) = 0 +++ killed by SIGSEGV +++ gdb output: (gdb) run test.php Starting program: /usr/bin/php test.php [Thread debugging using libthread_db enabled] [New Thread 0xb7f5a6d0 (LWP 4633)] [New Thread 0xb7c98b90 (LWP 4636)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7c98b90 (LWP 4636)] 0x0048cca2 in ?? () (gdb) bt #0 0x0048cca2 in ?? () #1 0x01312d00 in ?? () #2 0x08eece74 in ?? () #3 0x01312d00 in ?? () #4 0x00000004 in ?? () #5 0x08eed3fc in ?? () #6 0x00490130 in ?? () #7 0x08eedd30 in ?? () #8 0xffffff7c in ?? () #9 0xb7c98378 in ?? () #10 0x0048ce00 in ?? () #11 0x08eed3f8 in ?? () #12 0x00000008 in ?? () #13 0xb7c983b8 in ?? () #14 0x0048b393 in ?? () #15 0x08eed3f8 in ?? () #16 0x00000001 in ?? () #17 0x00000005 in ?? () #18 0xb7c98b0c in ?? () #19 0x007792c6 in ?? () from /lib/libpthread.so.0 #20 0x00000000 in ?? ()