RFR: 8230466: check malloc/calloc results in jdk.hotspot.agent

Baesken, Matthias matthias.baesken at sap.com
Tue Sep 3 07:42:55 UTC 2019

Hello, please review the following small fix .

In   jdk.hotspot.agent  native code (linux / macosx)   we miss to check the  result of malloc/calloc a few times .
This should be  adjusted.
Additionally  I added initialization  to the symtab  array  in  symtab.c   (by calling memset  to make sure we have a defined state )  .

One question (was not really sure about this one so I did not change it so far) :


359 void destroy_symtab(symtab_t* symtab) {
360   if (!symtab) return;
361   free(symtab->strs);
362   free(symtab->symbols);
363   free(symtab);
364 }

Here we miss to close   symtab->hash_table   (opened by  dbopen) ,  is it needed  (haven't  used dbopen much - maybe someone can comment on this)?

bug/webrev :



Thanks and best regards, Matthias

More information about the hotspot-dev mailing list