This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/78408] Aggressive optimization of zeroing results in incorrect behavior


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78408

--- Comment #2 from Nathaniel McCallum <npmccallum at redhat dot com> ---
Created attachment 40076
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40076&action=edit
simple test case

Compile with: gcc -o test test.c

This is a simple echo server. It *should* echo whatever the client types. 
However, if you type "foo" the first time and then type ctrl-d the second time,
the second reply is the same as the first reply. This is because the buffer was
not properly zeroed.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]