[Magick-bugs] Missing error handling for method AcquireSemaphoreInfo()

Stefan Koch devman at gmx-topmail.de
Fri Aug 17 12:46:21 PDT 2007


Hi there,

to my surprise in method AcquireWandId() (wand.c) for example, there's 
neither a check for the result of the AcquireSemaphoreInfo() calls nor a 
real exception handling done/possible. So, in case of an error the later 
invoked method RelinquishSemaphoreInfo() causes assertion failures 
because a null pointer is passed to it. Maybe this could be fixed?

Backtrace:

#0  0xb7a7eb01 in kill () at string2.h:998
#1  0xb7b7df65 in pthread_kill (thread=311316, signo=6) at signals.c:69
#2  0xb7b7dfab in __pthread_raise (sig=6) at signals.c:200
#3  0xb7a7e894 in *__GI_raise (sig=6)
     at ../linuxthreads/sysdeps/unix/sysv/linux/raise.c:38
#4  0xb7a7fccc in *__GI_abort () at ../sysdeps/generic/abort.c:88
#5  0xb7a77cbf in *__GI___assert_fail (
     assertion=0xb6cbaf88 "semaphore_info != (SemaphoreInfo *) ((void 
*)0)",
     file=0xb6cbaf57 "magick/semaphore.c", line=373,
     function=0xb6cbb05d "RelinquishSemaphoreInfo") at assert.c:83
#6  0xb6b818d1 in RelinquishSemaphoreInfo () from /usr/lib/libMagick.so.9
#7  0xb6a0a132 in AcquireWandId () from /usr/lib/libWand.so.9
#8  0xb69e8418 in NewDrawingWand () from /usr/lib/libWand.so.9
#9  0xb69ed29c in DrawAllocateWand () from /usr/lib/libWand.so.9

(...)

Regards,
Stefan

--
libmagick9 7:6.2.4.5.dfsg1-0.14
debian/linux


More information about the Magick-bugs mailing list