[Bug 432433] New: Bug in factory code checks for sequence-point
https://bugzilla.novell.com/show_bug.cgi?id=432433 Summary: Bug in factory code checks for sequence-point Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: bitdealer@gmail.com QAContact: adrian@novell.com Found By: --- My Code::Blocks build for Factory fails because of the following: I: Program causes undefined operation (likely same variable used twice and post/pre incremented in the same expression). e.g. x = x++; Split it in two operations. E: codeblocks sequence-point ../../../src/include/filefilters.h: 208 See https://build.opensuse.org/package/live_build_log?arch=i586&package=CodeBlocks&project=home%3Abitshuffler&repository=openSUSE_Factory for the full log. The file in question is http://pastebin.ca/1220176 . As you can see the file isn't 208 lines long and a header file, which is why I was told that the check might report the wrong file which sounds pretty reasonable to me (I'm absolutely no C/C++ guy). Also the only option to find out what triggered that check to fail was said to be a complete code review starting with every file that includes that header file. Which isn't really an option either since the codebase is pretty big. So I would like to suggest the following: 1. If a check fails the program should cite the offending line of code so I can at least narrow it down by greping for that line. 2. If the check needs only one line as input it should rerun against the extracted / cited line of code. 3. The check should grep the source file for the offending line of code to verify its extracted filename and line number are correct. While only the first thing is relevant to me (the user) to find the offending code and fix it the other two would be great IMHO to verify the correctness of the checks since they would act like unit tests for every single failed check and thereby help you improving them. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User adrian@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c1 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |ro@novell.com --- Comment #1 from Adrian Schröter <adrian@novell.com> 2008-10-06 00:42:58 MDT --- For Rudi, but he is on vacation this week. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User andrea@opensuse.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c2 andrea florio <andrea@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrea@opensuse.org --- Comment #2 from andrea florio <andrea@opensuse.org> 2008-10-09 15:27:52 MDT --- similar issue... error is: I: Program is using implicit definitions of special functions. these functions need to use their correct prototypes to allow the lightweight buffer overflow checking to work. - Implicit memory/string functions need #include <string.h>. - Implicit *printf functions need #include <stdio.h>. - Implicit *printf functions need #include <stdio.h>. - Implicit *read* functions need #include <unistd.h>. - Implicit *recv* functions need #include <sys/socket.h>. E: OpenCASCADE implicit-fortify-decl ../../../drv/ExprIntrp/lex.ExprIntrp.c: 2618 and file ../../../drv/ExprIntrp/lex.ExprIntrp.c is that one http://pastebin.com/f695fc969 the error tell me to add the following somewhere.. #include <string.h> #include <stdio.h> #include <unistd.h> #include <sys/socket.h> but as you can see stdio.h is already included (line 29), same for unistd.h (line 43) full log here https://build.opensuse.org/package/show?package=OpenCascade&project=home%3Aanubisg1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User mrueckert@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c3 Marcus Rückert <mrueckert@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mrueckert@novell.com --- Comment #3 from Marcus Rückert <mrueckert@novell.com> 2008-10-09 15:30:50 MDT --- just look for the offending filename earlier in the build log and you will get a clue what is missing. the error message just says it is implict declarations. and mentions some common failures. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User ro@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c5 Ruediger Oertel <ro@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmueller@novell.com Status|NEW |NEEDINFO Info Provider| |matz@novell.com --- Comment #5 from Ruediger Oertel <ro@novell.com> 2008-10-14 17:57:50 MDT --- gcc warning checks ... calling for help ;) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c6 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|matz@novell.com | --- Comment #6 from Dirk Mueller <dmueller@novell.com> 2008-10-14 19:20:06 MDT --- the quoted forum link contains the patch to fix the warning. another solution would be to use "-w" when building that particular file. unfortunately I couldn't figure out what the actual warning was because the buildservice project fails due to FHS file checks at the moment and not due to something else. to avoid that, remove the post-build-checks package (BuildIgnore: could do it I think, or BuildRequires: -post-build-checks). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c7 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|ro@novell.com |matz@novell.com --- Comment #7 from Dirk Mueller <dmueller@novell.com> 2008-10-14 19:26:31 MDT --- regarding comment one: the line in question is: id = (id == wxNOT_FOUND) ? 7 : ++id; however, the diagnostic location is indeed wrong. looks like a bug -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User rguenther@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c8 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |bitdealer@gmail.com --- Comment #8 from Richard Guenther <rguenther@novell.com> 2008-10-15 02:07:14 MDT --- We need a testcase (preprocessed source of the offending file) to do anything about it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User bitdealer@gmail.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c9 Stephan Kleine <bitdealer@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|bitdealer@gmail.com | --- Comment #9 from Stephan Kleine <bitdealer@gmail.com> 2008-10-15 07:58:58 MDT --- Sorry if I misunderstand you but I already posted the source in question (pastebin link in the first post) which contains nothing that would justify such an error so it is probably the wrong file (which is why I asked you to change the tests so they print out the line of code that made the check fail so I at least could grep for it). Besides that the whole stuff (source & build logs) are available from https://build.opensuse.org/package/show?package=CodeBlocks&project=home%3Abitshuffler (sorry for the inconvenience but I don't know a thing about C/C++). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User matz@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c10 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|matz@novell.com |dmueller@novell.com --- Comment #10 from Michael Matz <matz@novell.com> 2008-10-29 08:07:48 MDT --- If comment #7 indicates the line that GCC warns about, then GCC is correct: id = (id == wxNOT_FOUND) ? 7 : ++id; There's a sequence point after the evaluation of the conditional, but not any more. Hence, if the condition is false, this is equivalent to: id = ++id; which indeed is invalid C and C++. I don't know if the rpmlint messages are now fixed to indicate the right line number or not, but this is no GCC bug. Reassigning to Dirk for the line number problem, he might close this if that is fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c11 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|dmueller@novell.com |matz@novell.com --- Comment #11 from Dirk Mueller <dmueller@novell.com> 2008-11-03 14:05:56 MST --- the line number that the gcc gives as warning is incorrect. its not a bug in rpmlint/build check. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User rguenther@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c13 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |bitdealer@gmail.com --- Comment #13 from Richard Guenther <rguenther@novell.com> 2008-11-04 02:34:38 MST --- We need preprocessed source to do anything about this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User bitdealer@gmail.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c14 Stephan Kleine <bitdealer@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|bitdealer@gmail.com | --- Comment #14 from Stephan Kleine <bitdealer@gmail.com> 2008-11-04 08:36:54 MST --- Created an attachment (id=249684) --> (https://bugzilla.novell.com/attachment.cgi?id=249684) The preprocessed source The attached files should provide the requested information. If they don't, please tell me _exactly_ how to retrieve what you want. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User rguenther@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c15 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |bitdealer@gmail.com --- Comment #15 from Richard Guenther <rguenther@novell.com> 2008-11-04 09:20:03 MST --- The preprocessed file has been built with a precompiled header. Can you make sure to delete ../../../src/include/sdk_precomp.h.gch and undefine CB_PRECOMP before preprocessing? Basically the preprocessed source (the .ii file) should not contain lines like #pragma GCC pch_preprocess "../../../src/include/sdk_precomp.h.gch" Thanks. Richard. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User bitdealer@gmail.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c16 Stephan Kleine <bitdealer@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #249684|0 |1 is obsolete| | Status|NEEDINFO |NEW Info Provider|bitdealer@gmail.com | --- Comment #16 from Stephan Kleine <bitdealer@gmail.com> 2008-11-04 12:38:09 MST --- Created an attachment (id=249753) --> (https://bugzilla.novell.com/attachment.cgi?id=249753) The preprocessed source - 2nd try I deleted ../../../src/include/sdk_precomp.h.gch and added "#undef CB_PRECOMP" at the top of projectsimporter.cpp and now there aren't any such lines in the ii file. If this is still not what you are looking for then please describe it in an even more brain dead / fool proof way because I don't really know what I am doing there ;D -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User rguenther@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c17 --- Comment #17 from Richard Guenther <rguenther@novell.com> 2008-11-05 02:13:44 MST --- Created an attachment (id=249886) --> (https://bugzilla.novell.com/attachment.cgi?id=249886) unreduced testcase Massaged testcase to build with any G++ version and for 32bit and 64bit. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User rguenther@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c18 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low --- Comment #18 from Richard Guenther <rguenther@novell.com> 2008-11-05 03:48:22 MST --- With the preprocessed testcase the line-number information is correct. So the bug is likely precompiled header related. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |444188 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 Bug 432433 depends on bug 444188, which changed state. Bug 444188 Summary: gcc: wrong file/line reference for error messages when using precompiled headers https://bugzilla.novell.com/show_bug.cgi?id=444188 What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432433 User rguenther@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432433#c19 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |INVALID --- Comment #19 from Richard Guenther <rguenther@novell.com> 2009-02-24 05:59:20 MST --- The precompiled header has to be included from the primary source file or via -include. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com