Problem with CHECK_NULL macro in return statements

Doerr, Martin martin.doerr at sap.com
Fri Nov 2 09:38:43 PDT 2012


Hello everybody,

I found many places at which the CHECK_NULL macro gets used in a return statement like the following one:
return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);

However, this does not work as one would usually expect. The macro gets expanded to:
__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return NULL; (0

The return statement above prevents the code after "__the_thread__);" from ever getting evaluated.

Kind regards,
Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20121102/de165454/attachment.html 


More information about the hotspot-compiler-dev mailing list