review request (M) 6888954 - arg formatting for assert

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Mon Oct 12 13:31:30 PDT 2009


Can you explain the lifetime of the buffer returned by the const char*  
conversion?  Offhand it doesn't seem safe to me.

I'm don't think fatal(err_msg(a, b)) is an improvement over fatal1(a,  
b) but then I would have been fine with assert1 and friends.  You  
could make fatal appear variadic with some other macro tricks.

#define fatal \
   begin_failure(__FILE__, __LINE__) && report_fatal

report_fatal would expect to get file and line from some thread local  
buffer where it was cached by begin_failure.  Alternatively you could  
have a stack allocated object with a report_fatal method and use dot  
instead of and.

tom

On Oct 10, 2009, at 4:21 PM, John Coomes wrote:

> 6888954: argument formatting for assert() and friends
>
> Enable argument formatting for assert(), guarantee() and related
> macros.
>
> http://cr.openjdk.java.net/~jcoomes/6888954-assert-args/
>
> -John
>



More information about the hotspot-dev mailing list