https://bugs.winehq.org/show_bug.cgi?id=50779
--- Comment #21 from Rafał Mużyło galtgendo@o2.pl --- SHA1 of the regression would require a bisect, which (for reasons) I haven't done.
What I did do (at least AFAIR - it's been over 1.5 years since already), was establish it happened at 6.1 exactly, then comb it for sound changes (as the bug was triggered upon sound effects playing), then with your help notice it was virtual mapping space exhaustion triggered by spawning multiple threads for each sound effect. That pretty much pointed towards the changeset containing 'winegstreamer: Manage our own streaming thread'. As that changeset was too complex to revert bit by bit (at least at my skill level), I've pretty much stopped there.
Well, not so much stopped as that anything I've tried with adding debug lines and tinkering with little pieces afterwards didn't affect the bug. As the content of this bug is a bit confusing, to summarize in the game I could trigger the problem in the easiest way, all I needed to do was repeatedly press down in the title screen menu; on each press a sound effect from an mp3 file was being played; address exhaustion always managed to hit before engine's internal caching limit; changing that file to an ogg stopped the bug from triggering, as the engine embeds some ogg handling library, bypassing winegstreamer.
Given that patching wine to make pulseaudio *not* use shm makes a difference, it's likely cause something like each effect having its own stream, instead of putting them all into one (...OK, that's extremely badly phrased, but you should get the gist of it).