A successful realloc() already frees the old pointer.
Reported by: GCC -Wuse-after-free
Differential D37540
rpcgen: Don't free() a pointer after realloc(). jhb on Nov 29 2022, 7:54 PM. Authored by Tags None Referenced Files
Subscribers
Details A successful realloc() already frees the old pointer. Reported by: GCC -Wuse-after-free
Diff Detail
Event TimelineComment Actions
Maybe in practice the first allocation setting argmax to 32 ends up being sufficient? Comment Actions jemalloc doesn't detect most misuse of free() so likely it wasn't used as you speculate or future allocations didn't use the same size bucket enough to end up with aliasing allocations. |