http://bugs.winehq.org/show_bug.cgi?id=32554
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |setupapi
--- Comment #15 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming, the corruption is not reliably reproducible - as Ken indicated.
It seems corruption always happens in Setupapi StringTable (meta)data. The allocation of STRING_TABLE structure sometimes happens to be in different subheaps due to congestion in small blocks (0x10).
Setupapi uses allocation helpers 'MyMalloc', 'MyFree' etc. for StringTableXXX API which use the process heap.
I created a private heap in DllMain and let allocation helpers use it. The crashes immediately went away (corruption might be still present but wasn't triggered in my tests).
I wrote a script that runs the MS XPSEP installer in unattended install mode on 'fresh' WINEPREFIX in a loop. In between runs I reverted the prefix to 'fresh' state using btrfs snapshot feature. My WINEPREFIXes are btrfs subvolumes, allowing instant restore to whatever snapshot/state I need. The script ran for 500 loops without problems.
Without the private heap the crash rate was about 10%
I think a private heap should be considered here, we already have private allocation helpers in place.
Regards