| Summary: | Valgrind could have an option to search for pointers at unaligned addresses | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Salvatore Sanfilippo <antirez> |
| Component: | memcheck | Assignee: | Julian Seward <jseward> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | philippe.waroquiers |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Salvatore Sanfilippo
2018-03-26 16:51:22 UTC
I think it would not be very difficult to change this, it is not just the step to change, but the work should be limited (one day of work maybe? and then some tests :). However, there are some consequences: the leak search will be significantly slower when using the option, and will probably slowdown somewhat the leak search even when not using the option. It will also increase the false negative leaks, as there will be more chances to find a sequence of bytes matching a leaked block (or pointing inside a leaked blocked, giving a possibly leaked). Thanks for your comments Philippe! Glad that implementing this feature would not require too much work. About the false negatives, indeed that's possible, but fortunately only projects with this requirements would pay such a price, and with 64 bit pointers the probability of a collision is pretty low (but not as low as finding a random 8 bytes string, which is a negligible probability. Because most pointers in normal systems will use common byte values for the most significant part, like 0xff). I'm more worried about the overhead when the feature is not used, I hope it is kinda non measurable or extremely low so that the option can be considered for inclusion. Cheers. |