http://bugs.winehq.org/show_bug.cgi?id=60123 Bug ID: 60123 Summary: OutputDebugStringA/W payloads truncated at ~300 bytes in +debugstr/+seh channel output Product: Wine Version: 11.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: ntdll Assignee: wine-bugs@list.winehq.org Reporter: souyamadebnath@gmail.com Target Milestone: --- Distribution: --- Applications that emit long strings via OutputDebugStringA/W have their payloads truncated in wine's debug channel output. Both WINEDEBUG=+debugstr (warn:debugstr:OutputDebugStringA "...") and WINEDEBUG=+seh (warn:seh:dispatch_exception "...") print at most ~300 bytes followed by `"...`, because wine_dbgstr_an/wine_dbgstr_wn (include/wine/debug.h) format into a fixed `char buffer[300]`. To Reproduce: call OutputDebugStringA with a 400-char string and run with WINEDEBUG=+debugstr. Output ends with `"...` after ~300 chars. 1. Compile this test program with mingw: ``` #include <windows.h> int main(void) { char buf[500]; for (int i = 0; i < 400; i++) buf[i] = 'A' + (i % 26); buf[400] = 0; OutputDebugStringA(buf); OutputDebugStringA("short line\r\n"); return 0; } ``` ``` $ x86_64-w64-mingw32-gcc dbg.c -o dbg.exe ``` 2. Run under wine with the debugstr channel: ``` $ WINEDEBUG=+debugstr wine ./dbg.exe ``` Actual output (400-char payload clipped at ~300, note the trailing `"...`): ``` 0024:warn:debugstr:OutputDebugStringA "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDE"... 0024:warn:debugstr:OutputDebugStringA "short line\r\n" ``` Expected: the full 400-character string, as a debugger or DBWIN listener would receive on Windows. Same truncation occurs with WINEDEBUG=+seh (warn:seh:dispatch_exception). Side note on Windows behaviour: On Windows the full string is always delivered to consumers. A debugger attached via WaitForDebugEvent receives `OUTPUT_DEBUG_STRING_INFO` with the complete length (read via `ReadProcessMemory`), and `DBWIN_BUFFER` listeners (e.g. Sysinternals DebugView) receive up to 4 KiB per frame, with longer strings split across frames rather than dropped. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.