# New Ticket Created by Andy Dougherty # Please include the string: [perl #49316] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=49316 >
Although include/parrot/dynext.h says that the third argument of Parrot_init_lib is nonnull, that's actually not correct. A number of places (45 in the test suite) actually do pass in a null value, and Parrot_init_lib is designed to handle that case. However, with the attribute_nonnull, gcc's optimizer optimizes away the code in Parrot_init_lib to handle the null value! The result is a nice core dump. This patch fixes it by removing the nonnull attribute. diff -ru parrot-current/include/parrot/dynext.h parrot-andy/include/parrot/dynext.h --- parrot-current/include/parrot/dynext.h Wed Jan 2 08:59:39 2008 +++ parrot-andy/include/parrot/dynext.h Wed Jan 2 14:23:13 2008 @@ -34,8 +34,7 @@ ARGIN(void (*init_func)(PARROT_INTERP, ARGIN_NULLOK(PMC *)))) __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3); + __attribute__nonnull__(2); PARROT_API PARROT_WARN_UNUSED_RESULT -- Andy Dougherty [EMAIL PROTECTED]