RFR(XS): 8009287 Uninitialised variable in hotspot/agent/src/os/linux/ps_core.c (original) (raw)
Staffan Larsen staffan.larsen at oracle.com
Wed Mar 6 07:24:00 PST 2013
- Previous message: RFR(XS): 8009287 Uninitialised variable in hotspot/agent/src/os/linux/ps_core.c
- Next message: RFR(XS): 8009287 Uninitialised variable in hotspot/agent/src/os/linux/ps_core.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6 mar 2013, at 00:23, David Holmes <David.Holmes at oracle.com> wrote:
On 6/03/2013 9:08 AM, Dean Long wrote:
What if allocateinitmap() fails to allocate memory? Shouldn't addclasssharemapinfo() follow the pattern of addmapinfo(): return NULL or "map", and have the caller check for NULL? AFAICS apart from one seeming bug, if we can't allocate a new map it does no harm in terms of the code that looks at the map. The bug is: 177 mp = ph->core->classsharemaps; 178 if (mp) { 179 printdebug("can't locate mapinfo at 0x%lx, trying class share maps\n", 180 addr); where I think 178 should be "if (mp==NULL)".
I think this code is correct, although it took me a while to realize. If it can find a class share map, it reports that it will start looking at it.
/Staffan
Everything else will just do nothing upon encountering a NULL map.
The fix addresses the parfait warning and leaves the code functionally unchanged. So any robustness issues would need to be done via a follow up RFE. David
dl
On 3/4/2013 11:39 PM, David Holmes wrote: Looks fine to me - thanks Staffan!
David On 5/03/2013 5:24 PM, Staffan Larsen wrote: A very small fix for a warning.
webrev: http://cr.openjdk.java.net/~sla/8009287/webrev.00/ Thanks, /Staffan
- Previous message: RFR(XS): 8009287 Uninitialised variable in hotspot/agent/src/os/linux/ps_core.c
- Next message: RFR(XS): 8009287 Uninitialised variable in hotspot/agent/src/os/linux/ps_core.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]