This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/JVMTI] Implement GetErrorName


Tom Tromey wrote:

Keith> +  *name_ptr = (char *) _Jv_Malloc (strlen (name) + 1);
Keith> +  if (*name_ptr == NULL)
Keith> +    return JVMTI_ERROR_OUT_OF_MEMORY;

I think you want _Jv_MallocUnchecked here.
Hmm, I think we have this problem elsewhere in jvmti.cc.

I'll take a peek at that when I've finished the tests for the event handling stuff. It looks like we probably only want to use the unchecked variety and return JVMTI_ERROR_OUT_OF_MEMORY when the malloc fails. I don't see anyplace where we wouldn't do this. Do you?


With that change this is ok, thanks.

Committed. Thanks.


Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]