Repository navigation
Conversation
Fixing: - a local pair of malloc/free to use curl's memory allocators, and participate in memory tracing when enabled. - a raw free() in ECH code that's malloced in lib code, causing an invalid free, also reported by valgrind (in non-unity builds). Cherry-picked from curl#17827
|
Thanks for taking a look at this.
Can you walk me through how 49807e2 fixes this for my own education? My naive assumption based on the description above is that something alloc'd by librustls was being |
No, and sure, here's my understanding of this: libcurl code overrides free/malloc with its own implementation (primarily To apply these overrides to a source file, it needs to include In The remaining Lines 1002 to 1004 in beb64e6 is called on echconfiglist. That's allocated in lib/httpsrr.c, using curl'soverridden allocator. So that must use its overridden free pair.
|
|
@vszakats Ah! Thank you for the explanation. That makes sense to me and I see where I was confused 👍
I think those are OK, and there isn't a |
Fixing:
a raw
free()in ECH code that's malloced in lib code, causingan invalid free, also reported by valgrind (in non-unity builds).
And in unity builds adjusted to behave like non-unity via memory: make function overrides work reliably in unity builds #17827:
Ref: https://github.com/curl/curl/actions/runs/16093372427/job/45421778472?pr=17827#step:39:3321
a local pair of
malloc()/free()to use curl's memory allocators,and participate in memory tracking when enabled.
Cherry-picked from #17827