Review request: 6378314: Bad warning message when agent library not found. local directory is not searched.

Chuck Rasbold rasbold at google.com
Wed Aug 4 15:01:53 PDT 2010


Internally, we did discuss the "char buf[len]" construct, but forgot about
the SunStudio compilers. Sorry about that.

I've changed the new code to use AllocateHeap() and FreeHeap(), as does the
currently existing code within the #ifdef KERNEL.

And then I put a fix and a clean-up within that #ifdef, so the code is more
consistent throughout.

http://cr.openjdk.java.net/~rasbold/6378314/

-- Chuck


On Wed, Aug 4, 2010 at 1:28 PM, Paul Hohensee <paul.hohensee at oracle.com>wrote:

>  No 'new' and 'delete' in the hotspot source code please.  Use
> NEW_RESOURCE_ARRAY and FREE_RESOURCE_ARRAY.
>
> Paul
>
>
> On 8/4/10 4:15 PM, Kelly O'Hair wrote:
>
>>
>> On Aug 4, 2010, at 11:43 AM, Tom Rodriguez wrote:
>>
>>  The SunStudio compiler doesn't like this construct:
>>>
>>> +          size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) +
>>> strlen(ebuf) + 1;
>>> +          char buf[len];
>>>
>>>
>> I wondered about that.
>>
>>  so I think you'll have to use another fixed size buffer.
>>>
>>
>> or char * buf = new char[len];
>>
>> and a delete [] buf
>> ???
>>
>> -kto
>>
>>
>>> tom
>>>
>>> On Aug 4, 2010, at 11:20 AM, Chuck Rasbold wrote:
>>>
>>>  Thanks, John.
>>>>
>>>> The nits have been fixed and the webrev updated.
>>>>
>>>> http://cr.openjdk.java.net/~rasbold/6378314/
>>>>
>>>> -- Chuck
>>>>
>>>> On Tue, Aug 3, 2010 at 4:36 PM, John Coomes <John.Coomes at oracle.com>
>>>> wrote:
>>>> Chuck Rasbold (rasbold at google.com) wrote:
>>>>
>>>>> http://cr.openjdk.java.net/~rasbold/6378314/
>>>>>
>>>>> Fixed: 6378314: Bad warning message when agent library not found. local
>>>>> directory is not searched.
>>>>> Contributed-by: jeremymanson at google.com
>>>>>
>>>>> Print a more detailed error message for agent library load failure.
>>>>>
>>>>
>>>> Hi Chuck & Jeremy,
>>>>
>>>> Looks ok to me, aside from a couple of nits:  use jio_snprintf instead
>>>> of sprintf, and strlen returns a size_t, so use that to declare len.
>>>>
>>>> -John
>>>>
>>>>
>>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20100804/427e7dd8/attachment.html 


More information about the hotspot-runtime-dev mailing list