TEST SCRIPT =========== Test script executed with 'php -n -d extension=imagick.so t.php' is: getImageProfiles(); ?> The PNG image used can be downloaded from: http://upload.wikimedia.org/wikipedia/commons/8/8c/Transparent.png ------------------- emerge --info OUTPUT ==================== Portage 2.2.18 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.8.4, glibc-2.20-r2, 3.17.7-gentoo x86_64) ================================================================= System uname: Linux-3.17.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 32828252 total, 1982480 free KiB Swap: 16776116 total, 16775080 free Timestamp of repository gentoo: Sat, 25 Apr 2015 11:00:01 +0000 sh bash 4.2_p53 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.2_p53::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.9-r1::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo dev-util/cmake: 2.8.12.2-r1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.13.11::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.12.6::gentoo, 1.13.4::gentoo sys-devel/binutils: 2.24-r3::gentoo sys-devel/gcc: 4.6.4::gentoo, 4.7.3-r1::gentoo, 4.8.4::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=corei7" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=corei7" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="acl aes amd64 amr avx bash-completion berkdb bzip2 cli cracklib crypt cxx dri exif ffmpeg fma3 fortran gdbm gs iconv innodb ipv6 jpeg lcms mariadb memcache mmx mmxext modules multilib ncurses nptl openmp openssl pam pcre php png popcnt readline session sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 tcpd tiff unicode vhost vim-syntax xml zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="access auth_basic mp4 browser charset fastcgi gzip map limit_conn limit_req rewrite upstream_ip_hash slowfs_cache realip memcached headers_more stub_status" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON --------------- GDB =============== Reading symbols from /usr/lib64/php5.5/bin/php...Reading symbols from /usr/lib64/debug//usr/lib64/php5.5/bin/php.debug...done. done. (gdb) run -n -d extension=imagick.so t.php Starting program: /usr/lib64/php5.5/bin/php -n -d extension=imagick.so t.php warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff018c700 (LWP 15599)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff018c700 (LWP 15599)] THREAD 2 ======== 0x00007ffff081eb5a in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/libgomp.so.1 (gdb) bt #0 0x00007ffff081eb5a in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/libgomp.so.1 #1 0x00007ffff081d35e in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/libgomp.so.1 #2 0x00007ffff2f2b204 in start_thread () from /lib64/libpthread.so.0 #3 0x00007ffff38ff39d in clone () from /lib64/libc.so.6 THREAD 1 ======== (gdb) thread 1 (gdb) bt #0 0x00007ffff7df3b37 in munmap () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007ffff7df32ed in _dl_unmap_segments (l=0x1242f50, l=0x1242f50) at ./dl-unmap-segments.h:32 #2 _dl_unmap (map=map@entry=0x1242f50) at ../sysdeps/x86_64/tlsdesc.c:140 #3 0x00007ffff7defdb7 in _dl_close_worker (map=map@entry=0x1241a00) at dl-close.c:641 #4 0x00007ffff7df056c in _dl_close (_map=0x1241a00) at dl-close.c:775 #5 0x00007ffff7deab54 in _dl_catch_error (objname=0x11b9a40, errstring=0x11b9a48, mallocedp=0x11b9a38, operate=0x7ffff681f0f0 , args=0x1241a00) at dl-error.c:187 #6 0x00007ffff681f5cd in _dlerror_run (operate=operate@entry=0x7ffff681f0f0 , args=0x1241a00) at dlerror.c:163 #7 0x00007ffff681f11f in __dlclose (handle=) at dlclose.c:46 #8 0x000000000093467f in module_destructor (module=0x12443a0) at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/Zend/zend_API.c:2384 #9 0x000000000093ccc3 in zend_hash_apply_deleter (ht=0x119f820 , p=0x1244340) at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/Zend/zend_hash.c:650 #10 0x000000000093ce5e in zend_hash_graceful_reverse_destroy (ht=0x119f820 ) at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/Zend/zend_hash.c:687 #11 0x0000000000932650 in zend_destroy_modules () at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/Zend/zend_API.c:1895 #12 0x000000000092918b in zend_shutdown () at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/Zend/zend.c:828 #13 0x0000000000892eb7 in php_module_shutdown () at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/main/main.c:2388 #14 0x00000000009db501 in main (argc=5, argv=0x11a0e20) at /var/tmp/portage/dev-lang/php-5.5.24/work/sapis-build/cli/sapi/cli/php_cli.c:1393 ------------------------ VALGRIND ======== david@a ~/proof_imagick_alpha_bug $ valgrind --malloc-fill=ff --track-origins=yes /usr/lib64/php5.5/bin/php -n -d extension=imagick.so t.php ==7531== Memcheck, a memory error detector ==7531== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==7531== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==7531== Command: /usr/lib64/php5.5/bin/php -n -d extension=imagick.so t.php ==7531== ==7531== ==7531== HEAP SUMMARY: ==7531== in use at exit: 2,504 bytes in 16 blocks ==7531== total heap usage: 28,234 allocs, 28,218 frees, 4,670,650 bytes allocated ==7531== ==7531== LEAK SUMMARY: ==7531== definitely lost: 120 bytes in 3 blocks ==7531== indirectly lost: 176 bytes in 5 blocks ==7531== possibly lost: 304 bytes in 1 blocks ==7531== still reachable: 1,904 bytes in 7 blocks ==7531== suppressed: 0 bytes in 0 blocks ==7531== Rerun with --leak-check=full to see details of leaked memory ==7531== ==7531== For counts of detected and suppressed errors, rerun with: -v ==7531== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==7539== Memcheck, a memory error detector ==7539== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==7539== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==7539== Command: /usr/lib64/php5.5/bin/php -n -d extension=imagick.so t.php ==7539== --7539-- Valgrind options: --7539-- -v --7539-- --malloc-fill=ff --7539-- --track-origins=yes --7539-- Contents of /proc/version: --7539-- Linux version 3.17.7-gentoo (root@a) (gcc version 4.6.4 (Gentoo 4.6.4 p1.2, pie-0.5.2) ) #1 SMP Mon Jan 5 13:34:45 UTC 2015 --7539-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-avx-avx2-bmi --7539-- Page sizes: currently 4096, max supported 4096 --7539-- Valgrind library directory: /usr/lib64/valgrind --7539-- Reading syms from /usr/lib64/php5.5/bin/php --7539-- Considering /usr/lib/debug/usr/lib64/php5.5/bin/php.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /lib64/ld-2.20.so --7539-- Considering /usr/lib/debug/lib64/ld-2.20.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/valgrind/memcheck-amd64-linux --7539-- Considering /usr/lib/debug/usr/lib64/valgrind/memcheck-amd64-linux.debug .. --7539-- .. CRC is valid --7539-- object doesn't have a dynamic symbol table --7539-- Scheduler: using generic scheduler lock implementation. --7539-- Reading suppressions file: /usr/lib64/valgrind/default.supp ==7539== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-7539-by-david-on-??? ==7539== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-7539-by-david-on-??? ==7539== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-7539-by-david-on-??? ==7539== ==7539== TO CONTROL THIS PROCESS USING vgdb (which you probably ==7539== don't want to do, unless you know exactly what you're doing, ==7539== or are doing some strange experiment): ==7539== /usr/lib64/valgrind/../../bin/vgdb --pid=7539 ...command... ==7539== ==7539== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==7539== /path/to/gdb /usr/lib64/php5.5/bin/php ==7539== and then give GDB the following command ==7539== target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=7539 ==7539== --pid is optional if only one valgrind process is running ==7539== --7539-- REDIR: 0x4018140 (ld-linux-x86-64.so.2:strlen) redirected to 0x38076451 (vgPlain_amd64_linux_REDIR_FOR_strlen) --7539-- Reading syms from /usr/lib64/valgrind/vgpreload_core-amd64-linux.so --7539-- Considering /usr/lib/debug/usr/lib64/valgrind/vgpreload_core-amd64-linux.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so --7539-- Considering /usr/lib/debug/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so.debug .. --7539-- .. CRC is valid ==7539== WARNING: new redirection conflicts with existing -- ignoring it --7539-- old: 0x04018140 (strlen ) R-> (0000.0) 0x38076451 vgPlain_amd64_linux_REDIR_FOR_strlen --7539-- new: 0x04018140 (strlen ) R-> (2007.0) 0x04c2c560 strlen --7539-- REDIR: 0x4017ef0 (ld-linux-x86-64.so.2:index) redirected to 0x4c2c110 (index) --7539-- REDIR: 0x4018110 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c2d6b0 (strcmp) --7539-- REDIR: 0x4018e40 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c30160 (mempcpy) --7539-- Reading syms from /usr/lib64/libcrypto.so.1.0.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libssl.so.1.0.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libz.so.1.2.8 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libexslt.so.0.8.17 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libresolv-2.20.so --7539-- Considering /usr/lib/debug/lib64/libresolv-2.20.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /lib64/libreadline.so.6.2 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libsqlite3.so.0.8.6 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libmcrypt.so.4.4.8 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libdl-2.20.so --7539-- Considering /usr/lib/debug/lib64/libdl-2.20.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/libonig.so.2.0.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/libstdc++.so.6.0.19 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libt1.so.5.1.2 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libpng16.so.16.16.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libjpeg.so.62.1.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libgdbm.so.4.0.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libcurl.so.4.3.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libbz2.so.1.0.6 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libpcre.so.1.2.3 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libm-2.20.so --7539-- Considering /usr/lib/debug/lib64/libm-2.20.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/libxml2.so.2.9.2 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libfreetype.so.6.11.4 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libicui18n.so.54.1 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libicuuc.so.54.1 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libicuio.so.54.1 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libxslt.so.1.1.28 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/libgcc_s.so.1 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libc-2.20.so --7539-- Considering /usr/lib/debug/lib64/libc-2.20.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/libgcrypt.so.11.8.3 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libgpg-error.so.0.11.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libncurses.so.5.9 --7539-- object doesn't have a symbol table --7539-- Reading syms from /lib64/libpthread-2.20.so --7539-- Considering /usr/lib/debug/lib64/libpthread-2.20.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/libicudata.so.54.1 --7539-- object doesn't have a symbol table --7539-- REDIR: 0x90e6550 (libc.so.6:strcasecmp) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90e8840 (libc.so.6:strncasecmp) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90e5cd0 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90e0900 (libc.so.6:strcmp) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90e4050 (libc.so.6:rindex) redirected to 0x4c2bdf0 (rindex) --7539-- REDIR: 0x90e2350 (libc.so.6:strlen) redirected to 0x4c2c4a0 (strlen) --7539-- REDIR: 0x90dc880 (libc.so.6:malloc) redirected to 0x4c28ed0 (malloc) --7539-- REDIR: 0x90eaf90 (libc.so.6:__GI_memcpy) redirected to 0x4c2e050 (__GI_memcpy) --7539-- REDIR: 0x90eaf20 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90f2770 (libc.so.6:__memcpy_sse2_unaligned) redirected to 0x4c2da70 (memcpy@@GLIBC_2.14) --7539-- REDIR: 0x90e06b0 (libc.so.6:index) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90e06e0 (libc.so.6:__GI_strchr) redirected to 0x4c2bf50 (__GI_strchr) --7539-- REDIR: 0x90dcff0 (libc.so.6:realloc) redirected to 0x4c2b1d0 (realloc) --7539-- REDIR: 0x90e5d30 (libc.so.6:memset) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90e5da0 (libc.so.6:__GI_memset) redirected to 0x4c2f710 (memset) --7539-- REDIR: 0x91930b0 (libc.so.6:__memmove_ssse3_back) redirected to 0x4c2d810 (memcpy@GLIBC_2.2.5) --7539-- REDIR: 0x90e27c0 (libc.so.6:__GI_strncmp) redirected to 0x4c2ccf0 (__GI_strncmp) --7539-- REDIR: 0x90e56f0 (libc.so.6:bcmp) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x91a3080 (libc.so.6:__memcmp_sse4_1) redirected to 0x4c2efc0 (__memcmp_sse4_1) --7539-- REDIR: 0x90e0940 (libc.so.6:__GI_strcmp) redirected to 0x4c2d5c0 (__GI_strcmp) --7539-- REDIR: 0x90e53a0 (libc.so.6:memchr) redirected to 0x4c2d750 (memchr) --7539-- REDIR: 0x90ecf00 (libc.so.6:strchrnul) redirected to 0x4c2fd70 (strchrnul) --7539-- REDIR: 0x90dcf60 (libc.so.6:free) redirected to 0x4c2a140 (free) --7539-- REDIR: 0x90e63e0 (libc.so.6:__GI_stpcpy) redirected to 0x4c2f160 (__GI_stpcpy) --7539-- REDIR: 0x90e4ca0 (libc.so.6:__GI_strstr) redirected to 0x4c303f0 (__strstr_sse2) --7539-- REDIR: 0x90e5730 (libc.so.6:__GI_memcmp) redirected to 0x4c2ef40 (__GI_memcmp) --7539-- REDIR: 0x90e1dd0 (libc.so.6:__GI_strcpy) redirected to 0x4c2c660 (__GI_strcpy) --7539-- REDIR: 0x917f5d0 (libc.so.6:__strcasecmp_avx) redirected to 0x4c2ce40 (strcasecmp) --7539-- REDIR: 0x90dd2b0 (libc.so.6:calloc) redirected to 0x4c2afb0 (calloc) --7539-- Reading syms from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/imagick.so --7539-- Considering /usr/lib/debug/usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/imagick.so.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/libMagickWand-6.Q16.so.2.0.0 --7539-- Considering /usr/lib/debug/usr/lib64/libMagickWand-6.Q16.so.2.0.0.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/libMagickCore-6.Q16.so.2.0.0 --7539-- Considering /usr/lib/debug/usr/lib64/libMagickCore-6.Q16.so.2.0.0.debug .. --7539-- .. CRC is valid --7539-- Reading syms from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/libgomp.so.1.0.0 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/liblcms2.so.2.0.6 --7539-- object doesn't have a symbol table --7539-- Reading syms from /usr/lib64/libltdl.so.7.3.1 --7539-- object doesn't have a symbol table --7539-- REDIR: 0x90e5ea0 (libc.so.6:mempcpy) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x91905e0 (libc.so.6:__mempcpy_ssse3_back) redirected to 0x4c2fe90 (mempcpy) --7539-- REDIR: 0x9183220 (libc.so.6:__strcmp_ssse3) redirected to 0x4c2d570 (strcmp) --7539-- REDIR: 0xffffffffff600400 (???:???) redirected to 0x3807643d (vgPlain_amd64_linux_REDIR_FOR_vtime) --7539-- REDIR: 0x90e4010 (libc.so.6:strncpy) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90f7960 (libc.so.6:__strncpy_sse2_unaligned) redirected to 0x4c2cb30 (__strncpy_sse2_unaligned) --7539-- REDIR: 0x9180c40 (libc.so.6:__strncasecmp_avx) redirected to 0x4c2cf20 (strncasecmp) --7539-- REDIR: 0x90de9d0 (libc.so.6:posix_memalign) redirected to 0x4c2b5b0 (posix_memalign) --7539-- REDIR: 0x90e88b0 (libc.so.6:__GI___strncasecmp_l) redirected to 0x4c2d470 (__GI___strncasecmp_l) --7539-- REDIR: 0x90eccf0 (libc.so.6:rawmemchr) redirected to 0x4c2fdb0 (rawmemchr) --7539-- REDIR: 0x90e1d90 (libc.so.6:strcpy) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90f7330 (libc.so.6:__strcpy_sse2_unaligned) redirected to 0x4c2c580 (strcpy) --7539-- REDIR: 0xffffffffff600000 (???:???) redirected to 0x38076433 (vgPlain_amd64_linux_REDIR_FOR_vgettimeofday) --7539-- REDIR: 0x90e2770 (libc.so.6:strncmp) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x9184480 (libc.so.6:__strncmp_ssse3) redirected to 0x4c2cc80 (strncmp) --7539-- REDIR: 0x90e5160 (libc.so.6:strstr) redirected to 0x4a23710 (_vgnU_ifunc_wrapper) --7539-- REDIR: 0x90fb9d0 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4c30360 (strstr) --7539-- REDIR: 0x90e2510 (libc.so.6:strnlen) redirected to 0x4c2c440 (strnlen) --7539-- Reading syms from /usr/lib64/ImageMagick-6.9.0/modules-Q16/coders/png.so --7539-- Considering /usr/lib/debug/usr/lib64/ImageMagick-6.9.0/modules-Q16/coders/png.so.debug .. --7539-- .. CRC is valid --7539-- REDIR: 0x4018f90 (ld-linux-x86-64.so.2:stpcpy) redirected to 0x4c2f4e0 (stpcpy) --7539-- Discarding syms at 0xceda200-0xcef4e75 in /usr/lib64/ImageMagick-6.9.0/modules-Q16/coders/png.so due to munmap() --7539-- Discarding syms at 0xbb3cb60-0xbb61039 in /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/imagick.so due to munmap() --7539-- Discarding syms at 0xbd992e0-0xbe51849 in /usr/lib64/libMagickWand-6.Q16.so.2.0.0 due to munmap() --7539-- Discarding syms at 0xc0a3bc0-0xc205348 in /usr/lib64/libMagickCore-6.Q16.so.2.0.0 due to munmap() --7539-- Discarding syms at 0xc467750-0xc46e6e0 in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/libgomp.so.1.0.0 due to munmap() --7539-- Discarding syms at 0xc6809b0-0xc6b1f69 in /usr/lib64/liblcms2.so.2.0.6 due to munmap() --7539-- Discarding syms at 0xc8ce560-0xc8d2626 in /usr/lib64/libltdl.so.7.3.1 due to munmap() ==7539== ==7539== HEAP SUMMARY: ==7539== in use at exit: 2,504 bytes in 16 blocks ==7539== total heap usage: 28,234 allocs, 28,218 frees, 4,670,650 bytes allocated ==7539== ==7539== Searching for pointers to 16 not-freed blocks ==7539== Checked 9,333,800 bytes ==7539== ==7539== LEAK SUMMARY: ==7539== definitely lost: 120 bytes in 3 blocks ==7539== indirectly lost: 176 bytes in 5 blocks ==7539== possibly lost: 304 bytes in 1 blocks ==7539== still reachable: 1,904 bytes in 7 blocks ==7539== suppressed: 0 bytes in 0 blocks ==7539== Rerun with --leak-check=full to see details of leaked memory ==7539== ==7539== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==7539== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) david@a ~/proof_imagick_alpha_bug $ valgrind --leak-check=full --malloc-fill=ff --track-origins=yes /usr/lib64/php5.5/bin/php -n -d extension=imagick.so t.php ==31563== Memcheck, a memory error detector ==31563== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==31563== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==31563== Command: /usr/lib64/php5.5/bin/php -n -d extension=imagick.so t.php ==31563== ==31563== ==31563== HEAP SUMMARY: ==31563== in use at exit: 2,504 bytes in 16 blocks ==31563== total heap usage: 28,234 allocs, 28,218 frees, 4,670,650 bytes allocated ==31563== ==31563== 16 bytes in 1 blocks are definitely lost in loss record 4 of 16 ==31563== at 0x4C28F40: malloc (vg_replace_malloc.c:296) ==31563== by 0xC8CEAF8: ??? ==31563== by 0xC8CEB2D: ??? ==31563== by 0xC8CE929: ??? ==31563== by 0xC8D010B: ??? ==31563== by 0xC171C49: ??? ==31563== by 0xC1728AC: ??? ==31563== by 0xC16D00E: ??? ==31563== by 0xBB5FB4B: ??? ==31563== by 0x93209F: zend_startup_module_ex (zend_API.c:1759) ==31563== by 0x93CF4C: zend_hash_apply (zend_hash.c:716) ==31563== by 0x932617: zend_startup_modules (zend_API.c:1886) ==31563== ==31563== 104 (88 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 12 of 16 ==31563== at 0x4C28F40: malloc (vg_replace_malloc.c:296) ==31563== by 0xC8CEAF8: ??? ==31563== by 0xC8CEB2D: ??? ==31563== by 0xC8D1115: ??? ==31563== by 0xC8D15A1: ??? ==31563== by 0xC8CEA37: ??? ==31563== by 0xC171C49: ??? ==31563== by 0xC1728AC: ??? ==31563== by 0xC16D00E: ??? ==31563== by 0xBB5FB4B: ??? ==31563== by 0x93209F: zend_startup_module_ex (zend_API.c:1759) ==31563== by 0x93CF4C: zend_hash_apply (zend_hash.c:716) ==31563== ==31563== 176 (16 direct, 160 indirect) bytes in 1 blocks are definitely lost in loss record 13 of 16 ==31563== at 0x4C28F40: malloc (vg_replace_malloc.c:296) ==31563== by 0xC8D22AD: ??? ==31563== by 0xC8CEC74: ??? ==31563== by 0xC8D0023: ??? ==31563== by 0xC8CEA46: ??? ==31563== by 0xC171C49: ??? ==31563== by 0xC1728AC: ??? ==31563== by 0xC16D00E: ??? ==31563== by 0xBB5FB4B: ??? ==31563== by 0x93209F: zend_startup_module_ex (zend_API.c:1759) ==31563== by 0x93CF4C: zend_hash_apply (zend_hash.c:716) ==31563== by 0x932617: zend_startup_modules (zend_API.c:1886) ==31563== ==31563== 304 bytes in 1 blocks are possibly lost in loss record 15 of 16 ==31563== at 0x4C2B030: calloc (vg_replace_malloc.c:623) ==31563== by 0x40112E1: allocate_dtv (dl-tls.c:323) ==31563== by 0x40119BD: _dl_allocate_tls (dl-tls.c:488) ==31563== by 0x9ADBFC4: allocate_stack (allocatestack.c:590) ==31563== by 0x9ADBFC4: pthread_create@@GLIBC_2.2.5 (pthread_create.c:497) ==31563== by 0xC46C905: ??? ==31563== by 0xC15E416: ??? ==31563== by 0xCEE2254: ??? ==31563== by 0xCEE2E7D: ??? ==31563== by 0xC0E5827: ??? ==31563== by 0xBDF6699: ??? ==31563== by 0xBB3D054: ??? ==31563== by 0xBB3D339: ??? ==31563== ==31563== LEAK SUMMARY: ==31563== definitely lost: 120 bytes in 3 blocks ==31563== indirectly lost: 176 bytes in 5 blocks ==31563== possibly lost: 304 bytes in 1 blocks ==31563== still reachable: 1,904 bytes in 7 blocks ==31563== suppressed: 0 bytes in 0 blocks ==31563== Reachable blocks (those to which a pointer was found) are not shown. ==31563== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==31563== ==31563== For counts of detected and suppressed errors, rerun with: -v ==31563== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)