https://bugs.winehq.org/show_bug.cgi?id=57575
Bug ID: 57575 Summary: dmsynth: incorrect condition for buffer underrun in synthsink.c:synth_sink_write_data Product: Wine Version: 9.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: dmusic Assignee: wine-bugs@winehq.org Reporter: galtgendo@o2.pl CC: rbernon@codeweavers.com Distribution: ---
Noting this here, so it won't get forgotten.
In synth_sink_write_data there's following condition:
if (current_pos - play_pos <= write_pos - play_pos)
it causes a lot of console spam while current_pos == write_pos.
I though it was perhaps some odd way of preventing integer over/underflow, but the author of that line, when asked on irc, basically said 'yeah, it's bogus'.
http://bugs.winehq.org/show_bug.cgi?id=57575
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED CC| |mstefani@winehq.org Ever confirmed|0 |1 Keywords| |patch
--- Comment #1 from Michael Stefaniuc mstefani@winehq.org --- Confirming with Street Fighter X Mega Man: SFxMM_EU.zip SHA1: 396b0d3fc737e7f96d8e7201b3a8ab1fb0e64240
Fixed for me with https://gitlab.winehq.org/wine/wine/-/merge_requests/7940
http://bugs.winehq.org/show_bug.cgi?id=57575
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED Fixed by SHA1| |524e24757be008dbed6946f897d | |41b2ef2cb381e
--- Comment #2 from Michael Stefaniuc mstefani@winehq.org --- Fix merged as 524e24757be008dbed6946f897d41b2ef2cb381e
http://bugs.winehq.org/show_bug.cgi?id=57575
--- Comment #3 from Rafał Mużyło galtgendo@o2.pl --- ...so, given the fix, may I ask why exactly play_pos is on both sides of the comparison ?
http://bugs.winehq.org/show_bug.cgi?id=57575
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- That was my initial impulse too. Removing it produced even wackier ERRs. Those variables are all DWORDs so unsigned and they rely on unsigned underflow.
http://bugs.winehq.org/show_bug.cgi?id=57575
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 10.8.