Summary: | please support memcheck annotations for benign out of bound accesses | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Konstantin Serebryany <konstantin.s.serebryany> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | REPORTED --- | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.5 SVN | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
unittest
approximate patch |
Description
Konstantin Serebryany
2009-06-30 10:09:00 UTC
Created attachment 34933 [details]
unittest
Created attachment 34934 [details]
approximate patch
Re patch #3, that is going to add a minimum of two instructions (cmpb $0, $ignore_reads; jcond ...) to all fast paths. Ungood. Here's an alternative suggestion: don't mess with the fast-case handlers. Instead, move the logic into MC_(record_address_error). That means we only pay the cost of it for memory accesses which do cause an error, instead of on all accesses. In fact, see function MC_(in_ignored_range) called at top of MC_(record_address_error). A mechanism like this kind-of already exists, in order to support the --ignore-ranges flag for memcheck. Although I should point out the resulting semantics are a bit different. |