Problem with CHECK_NULL macro in return statements
Christian Thalinger
christian.thalinger at oracle.com
Mon Nov 5 08:44:15 PST 2012
On Nov 2, 2012, at 9:38 AM, "Doerr, Martin" <martin.doerr at sap.com> wrote:
> 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.
There was a discussion with Volker about this issue some time ago. I can't remember what the outcome was. Do you guys have a fix to propose?
-- Chris
>
> Kind regards,
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20121105/6aecdc06/attachment.html
More information about the hotspot-compiler-dev
mailing list