Le 14/01/2020 à 20:01, Tom Hughes a écrit :
On 14/01/2020 18:55, Paul-Antoine Arras wrote:
Le 14/01/2020 à 19:51, Tom Hughes a écrit :
On 14/01/2020 16:53, Paul-Antoine Arras wrote:
[...]
I struggle to understand how a read into a block of properly alloc'd
memory can be invalid, given that the application doesn't use client
requests.
[...]
How can a block of dynamically-allocated memory be marked
unaddressable without having been freed?
By using the VALGRIND_MAKE_MEM_NOACCESS macro.
Sure, but as I mentioned in my message, the application code does not
use client requests.
Using it as a thread stack could also do it, though it looks a
bit small for that, or some sort or whacky stack pointer stunts
that lead to valgrind thinking it's part of the stack.
That's interesting. The block in question is not a thread stack but a
regular struct. However, at other places the code does play with
manually-allocated thread stacks, hence stack pointer switches that
might confuse Valgrind.
Can you see a way to confirm this conjecture? In other words, how can I
ensure this is a legitimate false positive?
Many thanks,
--
Paul-Antoine Arras
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users