[Bug 12351] New: thread stack PAGE_GUARD/overflow handling ( NT compatibility)
http://bugs.winehq.org/show_bug.cgi?id=12351 Summary: thread stack PAGE_GUARD/overflow handling (NT compatibility) Product: Wine Version: CVS/GIT Platform: All OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P1 Component: -unknown AssignedTo: wine-bugs(a)winehq.org ReportedBy: focht(a)gmx.net Hello, this one is just follow up of recent .NET page guard patch commits, as requested by AJ ;-) Low priority. --- snip example code ---- MEMORY_BASIC_INFORMATION mbi; DWORD oldProtect; SetLastError(0xdeadbeef); ok(VirtualQuery( &mbi, &mbi, sizeof(MEMORY_BASIC_INFORMATION)) == sizeof(mbi)); ok(!VirtualProtect( mbi.BaseAddress, mbi.RegionSize, PAGE_GUARD, &oldProtect)); ok(GetLastError() == ERROR_INVALID_PARAMETER); --- snip example code ---- Glibc mprotect() code triggers the segfault. Another test for NT compatibility, touch the last guard page... --- snip example code ---- void stack_overflow() { char eat_stack[0x4000]; stack_overflow(); } __TRY { stack_overflow(); } __EXCEPT(UnhandledExceptionFilter) { ok(GetExceptionCode() == EXCEPTION_STACK_OVERFLOW); } __ENDTRY __TRY { stack_overflow(); } __EXCEPT(UnhandledExceptionFilter) { ok(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION); } __ENDTRY --- snip example code ---- Regards -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12351 --- Comment #1 from Alexandre Julliard <julliard(a)winehq.org> 2008-04-04 02:52:18 --- (In reply to comment #0)
--- snip example code ---- MEMORY_BASIC_INFORMATION mbi; DWORD oldProtect;
SetLastError(0xdeadbeef); ok(VirtualQuery( &mbi, &mbi, sizeof(MEMORY_BASIC_INFORMATION)) == sizeof(mbi)); ok(!VirtualProtect( mbi.BaseAddress, mbi.RegionSize, PAGE_GUARD, &oldProtect)); ok(GetLastError() == ERROR_INVALID_PARAMETER); --- snip example code ----
Glibc mprotect() code triggers the segfault.
Actually this is not testing guard pages, it just demonstrates that Wine is less strict about rejecting invalid protection flags. The protection needs to be something like PAGE_READWRITE|PAGE_GUARD, and then the VirtualProtect call will succeed both on Windows and Wine. The second example works fine for me too, you just have to make the buffer smaller than a page to make sure to hit the last guard page. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12351 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase --- Comment #2 from Austin English <austinenglish(a)gmail.com> 2008-10-17 16:03:35 --- Is this still a problem in current (1.1.6 or newer) wine? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12351 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Version|CVS/GIT |0.9.58. --- Comment #3 from Anastasius Focht <focht(a)gmx.net> 2009-01-17 06:17:29 --- Hello, adjusted version tag and marking this one fixed. If real world apps depend on certain behaviour of protection flags/page guards currently not covered by Wine one might look at it again. Regards -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12351 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> 2009-01-30 11:04:04 --- Closing bugs fixed in 1.1.14. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12351 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2012-02-23 15:26:29 CST --- Removing deprecated 'All' Platform. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12351 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |ntdll Hardware|Other |x86 -- 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.
participants (1)
-
wine-bugs@winehq.org