There are 4 realloc functions that we support (realloc, reallocf, reallocarray and malloc_zone_realloc). However their error messages all use just "realloc()"
Created attachment 189359 [details] initial patch, FreeBSD only Need to run on Linux to update the expecteds there
Created attachment 189360 [details] Patch with Linux expecteds Also fixed a warning
(In reply to Paul Floyd from comment #2) > Created attachment 189360 [details] > Patch with Linux expecteds > > Also fixed a warning I think this should be fine since no error kinds are really changed, just the message printed. So suppressions should still work as is? You might want to also put static const HChar* reallocKinds[] into pub_tool_tooliface.h in case other tools might want to print the actual function name.
(In reply to Mark Wielaard from comment #3) > (In reply to Paul Floyd from comment #2) > > Created attachment 189360 [details] > > Patch with Linux expecteds > > > > Also fixed a warning > > I think this should be fine since no error kinds are really changed, just > the message printed. So suppressions should still work as is? Ues, the suppressions use "ReallocSizeZero" which I'm not going to change. > You might want to also put static const HChar* reallocKinds[] into > pub_tool_tooliface.h in case other tools might want to print the actual > function name. Hmm. Thinking of other tools maybe I can use hasfn = VG_(get_fnname)(ai->Addr.Stack.epoch, ai->Addr.Stack.IP, &fn); then I could leave the error struct alone, it already has struct { AddrInfo ai; } ReallocSizeZero;
Created attachment 189446 [details] Revised patch I've changed approach and added a new function that gets the first function name from an ExeContext. This is much less pervasive a change. It could also be be extended to the fishy and aligned memcheck errors which use generalised names that don't distinguish between nothrow(true) and nothrow(false) operator new overloads. That might not be entirely a bad thing.