Summary: | Add a "stop" frame to suppressions to do exact matches | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | leiz |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | bart.vanassche+kde, timurrrr |
Priority: | NOR | ||
Version: | 3.6 SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
patch to implement a stop frame
improved patch, don't mess with string_match() Rename stop to end, add a bit of documentation. |
Created attachment 40054 [details]
improved patch, don't mess with string_match()
This is an interesting idea. If you'd explained the motivation in a bit more detail, as per http://wiki.winehq.org/Wine_and_Valgrind section "Additional Patches", it might have gotten looked at sooner :-/ A terminological query. I'm pretty much regexp-clueless, but I do know regexps have some symbol which matches the end-of-input. Is that generally known as a "stop" symbol? I ask because I'd prefer to stick with existing regexp terminology if possible. Ping? Created attachment 41154 [details]
Rename stop to end, add a bit of documentation.
Pong. (life got in the way)
I'm also somewhat regexp-clueless. Typically for string matching, $ is the end of line. Maybe "end frame" is a better name?
How about replacing the text "STOP" by "end-of-stack:" ? FYI, Perl multiline-equivalent for "$" is "\z" (for "^" it's "\A") http://en.wikipedia.org/wiki/Regular_expression_examples What is the need for the end-of-stack thing? Recently I was re-writing the suppression mechanism in Dr. Memory (which is a Valgrind analog with Windows and Linux support) and during the review we've decided full-stack matches are not necessary. My experience of using Valgrind on Chromium shows that a) stack frames below main or start_thread are platform-specific in the reports b) frames below something like MessageLoop::ProcessMessage() differ between different runs due to different scheduling |
Created attachment 39856 [details] patch to implement a stop frame I would like to be able to write a suppression that matches: Memcheck:Leak fun:foo fun:bar but not: Memcheck:Leak fun:foo fun:bar fun:qux The proposal is to add a 'stop' frame to indicate when we should stop matching. i.e. { exact_suppression Memcheck:Leak fun:foo fun:bar STOP } The stop frame would only make sense as the last frame. Attached is an unpolished patch that implements this.