[Bug 28089] New: exception handling code touches stack for exceptions handled by the debugger
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Aug 15 13:50:34 CDT 2011
http://bugs.winehq.org/show_bug.cgi?id=28089
Summary: exception handling code touches stack for exceptions
handled by the debugger
Product: Wine
Version: unspecified
Platform: x86
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ntdll
AssignedTo: wine-bugs at winehq.org
ReportedBy: bernhardloos at googlemail.com
Created an attachment (id=35971)
--> (http://bugs.winehq.org/attachment.cgi?id=35971)
a hack to work around the problem
Wine places the CONTEXT and EXCEPTION_RECORD structures onto the stack past ESP
during the unix signal handler and continues with most of the exception
handling code outside of the signal handler. Unfortunately and contrary to
windows behavior the debugger gets notified only after this happens. Windows
doesn't touch the stack at all, if the exception is handled by the debugger.
This makes it very hard to single step trough code which keeps useful data past
ESP (securom 8 for example).
it's easy to show with this small test:
void foo()
{
char *x = 0, *y = 0, *from = 0, *to = 0;
char c;
x = &c;
y = &c - 500;
while (y != x)
*y++ = 0x55;
c = 0x77; /* single step a few times here */
y = &c - 500;
while (y != x)
{
if (*y != 0x55)
if (from)
to = y;
else
from = y;
y++;
}
/* to and from shoudl be NULL */
}
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list