http://bugs.winehq.org/show_bug.cgi?id=21573
Summary: Need heap overrun detection at beginning of buffers, too Product: Wine Version: 1.1.37 Platform: x86 OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
On Linux, valgrind gives nice warnings when you access before the first byte. It'd be nice if valgrinding Windows apps under Wine gave the same warnings. For instance, the following program should give three warnings under valgrind+wine just as it does under valgrind:
#include <stdio.h> #include <stdlib.h>
int badness_before_n_after ( char* p ) { return p[-1] + p[10]; }
int main ( void ) { char* p = malloc(10); int who_knows = badness_before_n_after(p); // expect 2 x invalid address yelpage who_knows += p[5]; if (who_knows == 42) printf("It's 42 (!)\n"); else printf("It's not 42 (dull but unsurprising)\n"); free(p); return 0; }
http://bugs.winehq.org/show_bug.cgi?id=21573
--- Comment #1 from Dan Kegel dank@kegel.com 2010-02-01 17:08:27 --- Created an attachment (id=26017) --> (http://bugs.winehq.org/attachment.cgi?id=26017) rough draft - add redzone at beginning of allocations
Here's a quick unfinished draft of how one might go about adding this. I got as far as making space for the redzone, but didn't fill it or tell valgrind about it, but it's not quite correct.
http://bugs.winehq.org/show_bug.cgi?id=21573
Julian Seward jseward@acm.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jseward@acm.org
http://bugs.winehq.org/show_bug.cgi?id=21573
--- Comment #2 from butraxz@gmail.com 2013-06-27 12:37:18 CDT --- This ticket has not been updated for over 900 days.
Is this still an issue in wine version 1.6-rc3 or higher or is this to be closed as abandoned ?
https://bugs.winehq.org/show_bug.cgi?id=21573
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch