Re: gdi32/tests: Add a test to check for ERROR_NOACCESS when passing an invalid buffer to GetObject

2010-05-10 Thread Jerome Leclanche
I just tried messing around with it, but all I can get is a timeout
like this in the tests:
err:ntdll:RtlpWaitForCriticalSection section 0x688add20 "gdiobj.c:
gdi_section" wait timed out in thread 0024, blocked by 0023, retrying
(60 sec)

Or worse, a crash in the app:
err:gdi:GDI_CheckNotLock BUG: holding GDI lock
wine: Unhandled exception 0x8003 at address 0x7edebb63 (thread
0009), starting debugger...
DebugBreak () at /home/adys/src/wine/dlls/kernel32/../../include/winternl.h:1957
0x7edebb63 DebugBreak+0x3
[/home/adys/src/wine/dlls/kernel32/../../include/winternl.h:1957] in
kernel32: int$3
1957static inline void WINAPI DbgBreakPoint(void) { __asm__
__volatile__("int3"); }

What am I missing?


J. Leclanche



On Mon, May 10, 2010 at 6:31 AM, Vitaliy Margolen
 wrote:
> On 05/09/2010 03:15 PM, Jerome Leclanche wrote:
>> On Sun, May 9, 2010 at 11:55 PM, Jerome Leclanche  wrote:
>>> Testcase for bug 18864.
>>>
>> This patch reveals a crash in GetObject in wine which I'm unsure how
>> to fix. Someone proposed using IsBadWritePtr(), but from what I
>> understand, this is not a recommended solution. Any idea?
> If it doesn't crash on windows and you have a program that depends on broken
> behavior - wrap the entire function with exception handler block. For
> example see lstrcatA & co.
>
> Vitaliy.
>




Re: gdi32/tests: Add a test to check for ERROR_NOACCESS when passing an invalid buffer to GetObject

2010-05-09 Thread Vitaliy Margolen
On 05/09/2010 03:15 PM, Jerome Leclanche wrote:
> On Sun, May 9, 2010 at 11:55 PM, Jerome Leclanche  wrote:
>> Testcase for bug 18864.
>>
> This patch reveals a crash in GetObject in wine which I'm unsure how
> to fix. Someone proposed using IsBadWritePtr(), but from what I
> understand, this is not a recommended solution. Any idea?
If it doesn't crash on windows and you have a program that depends on broken
behavior - wrap the entire function with exception handler block. For
example see lstrcatA & co.

Vitaliy.




Re: gdi32/tests: Add a test to check for ERROR_NOACCESS when passing an invalid buffer to GetObject

2010-05-09 Thread Jerome Leclanche
PS, please don't commit, the check is wrong. I'll resend it later.


J. Leclanche / Adys



On Mon, May 10, 2010 at 12:15 AM, Jerome Leclanche  wrote:
> On Sun, May 9, 2010 at 11:55 PM, Jerome Leclanche  wrote:
>> Testcase for bug 18864.
>>
>> J. Leclanche
>>
>
> This patch reveals a crash in GetObject in wine which I'm unsure how
> to fix. Someone proposed using IsBadWritePtr(), but from what I
> understand, this is not a recommended solution. Any idea?
>




Re: gdi32/tests: Add a test to check for ERROR_NOACCESS when passing an invalid buffer to GetObject

2010-05-09 Thread Jerome Leclanche
On Sun, May 9, 2010 at 11:55 PM, Jerome Leclanche  wrote:
> Testcase for bug 18864.
>
> J. Leclanche
>

This patch reveals a crash in GetObject in wine which I'm unsure how
to fix. Someone proposed using IsBadWritePtr(), but from what I
understand, this is not a recommended solution. Any idea?




Re: gdi32/tests: Add a test to check for ERROR_NOACCESS when passing an invalid buffer to GetObject

2010-05-09 Thread testbot
Hi,

While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
http://testbot.winehq.org/JobDetails.pl?Key=1981

Your paranoid android.


=== W98SE (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== WNT4WSSP6 (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== W2KPROSP4 (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== WXPPROSP3 (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== W2K3R2SESP2 (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== WVISTAADM (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== W2K8SE (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== W7PRO (32 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559

=== W7PROX64 (64 bit gdiobj) ===
gdiobj.c:68: Test failed: GetObject(invalid buff), expected 0, ERROR_NOACCESS, 
got 0, 3735928559