[Bug 27229] printf() newline missing with multibyte strings

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Dec 29 18:48:03 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=27229

Thomas Faller <tfaller1 at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tfaller1 at gmx.de

--- Comment #8 from Thomas Faller <tfaller1 at gmx.de> ---
printf is not the problem. Due to gcc optimizations printf 
is optimized to a puts -> \n will be removed.

If I use the switch -fno-builtin-printf the whole line (including \n) is
printed.


The problem that nothing is printed should be a fwrite (called by puts) issue.

Trace:

Call msvcrt.puts(00241868 "\xd1\x82\xd0\xb5\xd0\xba\xd1\x81\xd1\x82
\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e") ret=00401695
trace:msvcrt:_lock (29)
trace:msvcrt:MSVCRT__isatty :fd (1)
Call KERNEL32.WriteFile(00000017,0061fc0b,00000001,0061fbb8,00000000)
ret=7ebafee0
trace:file:WriteFile 0x17 0x61fc0b 1 0x61fbb8 (nil)
get_console_input_info( handle=0000 )
get_console_input_info() = 0 { history_mode=0, history_size=50,
history_index=0, edition_mode=0, input_cp=0, output_cp=65001, win=00000000,
title=L"" }
nls:MultiByteToWideChar cp 65001 "\xd1" -> (null), ret = 0
get_console_input_info( handle=0000 )
get_console_input_info() = 0 { history_mode=0, history_size=50,
history_index=0, edition_mode=0, input_cp=0, output_cp=65001, win=00000000,
title=L"" }
nls:MultiByteToWideChar cp 65001 "\xd1" -> L"", ret = 0
console:WriteConsoleW 0x17 L"" 0 0x61fbb8 (nil)
ntdll:NtWriteFile
(0x14,(nil),(nil),(nil),0x61f9f4,0x118a90,0x00000000,(nil),(nil))!
ntdll:NtWriteFile = SUCCESS (0)
Ret  KERNEL32.WriteFile() retval=00000001 ret=7ebafee0
msvcrt:MSVCRT__write WriteFile (fd 1, hand 0x17) failed-last error (87),
num_written 0
msvcrt:_unlock (29)
Ret  msvcrt.puts() retval=ffffffff ret=00401695

-- 
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.



More information about the wine-bugs mailing list