Regression : tools/wineinstall fails with an X Error

Paul Vriens Paul.Vriens at xs4all.nl
Thu Jan 20 11:43:52 CST 2005


On Thu, 2005-01-20 at 18:21, Robert Shearman wrote:
> Paul Vriens wrote:
> 
> >On Thu, 2005-01-20 at 11:47, Paul Vriens wrote:
> >  
> >
> >>On Wed, 2005-01-19 at 20:32, Alexandre Julliard wrote:
> >>    
> >>
> >>>Paul Vriens <Paul.Vriens at xs4all.nl> writes:
> >>>
> >>>      
> >>>
> >>>>and part of a trace:
> >>>>
> >>>>0009:trace:ole:COM_ApartmentRelease destroying apartment 0x77e64460,
> >>>>oxid 800000009
> >>>>        
> >>>>
> >>>Looks like some sort of heap corruption, the apartment pointer is
> >>>suspiciously similar to the bad contents of the x11drv window
> >>>structure.
> >>>
> >>>      
> >>>
> >>>>If you want a better trace, let me know.
> >>>>        
> >>>>
> >>>Yes I'd be interested to see the whole trace.
> >>>      
> >>>
> >>All seems to point to patch http://cvs.winehq.org/patch.py?id=15392
> >>
> >>I'm not a 100% convinced as I have some trouble with the regression
> >>testing. I started with a clean installed Wine upto this patch and I get
> >>the XError. If I go one patch back I don't see the problem.
> >>
> >>Paul.
> >>    
> >>
> >Ok, I'm convinced that the mentioned patch gives the X Error. But while
> >I was investigating the following happened:
> >
> >I ran "wine rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall
> >128 wine.inf" from within the tools directory. This gives the X Error.
> >
> >I did this several times after each other with the same result.
> >
> >I than ran "WINEDEBUG=+ole wine rundll32.exe
> >setupapi.dll,InstallHinfSection DefaultInstall 128 wine.inf" and the
> >error is gone !?!?
> >
> >The registry is now filled with all the default data.
> >
> >Any ideas how to proceed ? Is there a timing issue ?
> >  
> >
> 
> If it's heap corruption then it could well depend on the order of 
> allocations, so it could be timing dependent.
> I've attached a patch that poisons the apartment structure after when it 
> is freed so that hopefully any use-after-free will become more obvious. 
> Could you apply it and see what the results are? Does the X Error stop? 
> Do we now get warnings about accessing a handle of 0xcccccccc (run with 
> warn+all for this)?
> 
> Rob
> 
> ______________________________________________________________________
> Index: dlls/ole32/compobj.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/ole32/compobj.c,v
> retrieving revision 1.129
> diff -u -p -r1.129 compobj.c
> --- dlls/ole32/compobj.c	20 Jan 2005 10:35:46 -0000	1.129
> +++ dlls/ole32/compobj.c	20 Jan 2005 17:16:37 -0000
> @@ -329,6 +329,9 @@ DWORD COM_ApartmentRelease(struct apartm
>  
>          DeleteCriticalSection(&apt->cs);
>          CloseHandle(apt->thread);
> +        /* fill memory with invalid data to try and make us crash if we reuse
> +         * it */
> +        memset(apt, 0xcc, sizeof(*apt));
>          HeapFree(GetProcessHeap(), 0, apt);
>      }
>  
Hi Rob,

these are the last lines of the warn+all:

warn:file:wine_nt_to_unix_file_name L"quartz.dll" not found in
/home/paul/.wine/dosdevices/z:/data/install/linux/wine-src/wine/tools
warn:file:wine_nt_to_unix_file_name L"quartz.dll" not found in
/home/paul/.wine/dosdevices/z:/data/install/linux/wine-src/wine/tools
warn:file:wine_nt_to_unix_file_name L"quartz.dll" not found in
/home/paul/.wine/dosdevices/c:/windows/system
warn:file:wine_nt_to_unix_file_name L"quartz.dll" not found in
/home/paul/.wine/dosdevices/c:/windows
warn:heap:HEAP_ValidateInUseArena Heap 77de0000: invalid in-use arena
magic for 77e5b948
warn:heap:HEAP_ValidateInUseArena Heap 77de0000: invalid in-use arena
magic for 77e5b948
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  18 (X_ChangeProperty)
  Resource id in failed request:  0x77de0060
  Serial number of failed request:  107
  Current serial number in output stream:  113

there is no message regarding a accessing a handle of 0xcccccccc

Cheers,

Paul.




More information about the wine-devel mailing list