[Bug 1066090] New: gcc: snprintf gives warning: ‘%s’ directive output may be truncated writing 8 bytes into a region of size between 1 and 255
http://bugzilla.suse.com/show_bug.cgi?id=1066090 Bug ID: 1066090 Summary: gcc: snprintf gives warning: ‘%s’ directive output may be truncated writing 8 bytes into a region of size between 1 and 255 Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: bnc-team-screening@forge.provo.novell.com Reporter: bliu@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- gcc: snprintf gives warning: ‘%s’ directive output may be truncated writing 8 bytes into a region of size between 1 and 255 here is the upstream fix:) https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00140.html Feel free to re-assign to the right person. thanks -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1066090
Marcus Meissner
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c1
Richard Biener
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c2
Bin Liu
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c3
Richard Biener
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c4
Bin Liu
Please provide preprocessed source.
The project you link to doesn't even build pass the configure stage.
It needs kronosnet, which is also in my home project[1], the build failure is because [1] is not in openSUSE repo yet. I just build the package [1]locally on Tumbweed and then build corosync. In fact the waring part has nothing to do with kronosnet. It is just a warning from gcc by using snprintf, and I just want to make the warning disappear. If you think the issue is not a bug, feel free to close. thanks. [1]https://build.opensuse.org/package/show/home:BinLiu/kronosnet -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c5
Richard Biener
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c6
--- Comment #6 from Bin Liu
I can't tell if the issue is a bug in GCC or a bug in corosync. This is what I need a testcase for. A testcase is preprocessed source that I can investigate locally without all the corosync/kronosnet code.
You can get preprocessed source by appending -v -save-temps to the compiler command that provokes the warning, then look for a .i (or .ii if C++) file with the same basename as the source file. Please attach that file to the bug and paste the full output of the compiler command (the -v will print extra diagnostics that are useful for me).
Thanks.
Sorry, can you tell me How I add this "-v -save-temps" option when I use make, by adding this to CFLAGS? Or any other operations? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c7
--- Comment #7 from Richard Biener
(In reply to Richard Biener from comment #5)
I can't tell if the issue is a bug in GCC or a bug in corosync. This is what I need a testcase for. A testcase is preprocessed source that I can investigate locally without all the corosync/kronosnet code.
You can get preprocessed source by appending -v -save-temps to the compiler command that provokes the warning, then look for a .i (or .ii if C++) file with the same basename as the source file. Please attach that file to the bug and paste the full output of the compiler command (the -v will print extra diagnostics that are useful for me).
Thanks.
Sorry, can you tell me How I add this "-v -save-temps" option when I use make, by adding this to CFLAGS? Or any other operations?
Cut&paste the compiler command from the build log and add -v -save-temps? You should be able to chroot into the build-root. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c8
--- Comment #8 from Bin Liu
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c9
Bin Liu
Cut&paste the compiler command from the build log and add -v -save-temps?
You should be able to chroot into the build-root.
Is https://bugzilla.suse.com/show_bug.cgi?id=1066090#c8 what you wanted? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1066090
Bin Liu
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c13
--- Comment #13 from Bin Liu
http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c14
Bin Liu
participants (1)
-
bugzilla_noreply@novell.com