public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
@ 2015-06-02 4:33 juanslayton at dslextreme dot com
2015-06-02 5:07 ` [Bug c/66373] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: juanslayton at dslextreme dot com @ 2015-06-02 4:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
Bug ID: 66373
Summary: gcc downloaded from Fedora 21 repository produces
defective executable. Same source code with gcc from
Fedora 19 and Fedora 20 works fine
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: juanslayton at dslextreme dot com
Target Milestone: ---
Created attachment 35675
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35675&action=edit
source code and 3 compilations from different gcc versions
In the attached files, xs.c is the source file for a program that polls 40 USB
keyboards (the “student keyboards”) and does various things with any input that
it finds. Files a, b, and c are executable files produced by 3 different
editions of gcc downloaded from Fedora repositories. Each was compiled with
“gcc -Wall -Wextra -lSDL2 -lrt -lSDL2_ttf -O3 xs.c”. Each compilation was
clean, with no errors or warnings.
Files a and b work beautifully. File c misbehaves in such a way as to render
the program unusable. Under the circumstances, suspicion falls on the latest
edition of gcc as downloaded from the Fedora 21 repository.
Here are the specifics.
File a was compiled with Fedora 19, gcc version 4.8.2 20131212 (Red Hat
4.8.2-7)
File b was compiled with Fedora 20, gcc version 4.8.3 20140911 (Red Hat
4.8.3-7)
File c was compiled with Fedora 21, gcc version 4.9.2 20150212 (Red Hat
4.9.2-6)
The failure seems to be on a return from subroutine get_event, lines 2919ff,
of xp.c This subroutine is called to read keystrokes from student boards and
return them to the calling routines. There are 7 such routines; four present
math facts drills, one gives keyboarding practice, one gives advice on written
work from a textbook, and one is a rudimentary word processor. They process
returns from get_event in various ways, but the run time error is the same for
each of them, which points to get_event as the error location. This is not a
sure thing, and it could be that whatever the error is, it could be duplicated
in each of the 7 calling routines.
The error is this, when get_event returns 10, (ie, ‘enter’ has been pushed) the
program jumps to the primary program menu, rather than continuing the routine
that called get_event. Whether it does this by going through that routine, or
by somehow going around it, I haven’t yet determined. But the fact that only
compilations under the latest gcc edition show this behavior, suggests a bug
in the compiler. I can’t imagine what it would be.
>From gcc-bugs-return-487776-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 02 04:48:00 2015
Return-Path: <gcc-bugs-return-487776-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 39480 invoked by alias); 2 Jun 2015 04:48:00 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 39281 invoked by uid 48); 2 Jun 2015 04:47:27 -0000
From: "juanslayton at dslextreme dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
Date: Tue, 02 Jun 2015 04:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: juanslayton at dslextreme dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66373-4-5kM9WUa9z1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66373-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66373-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg00108.txt.bz2
Content-length: 159
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf373
--- Comment #1 from John Slayton <juanslayton at dslextreme dot com> ---
reference to xp.c should be xs.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
@ 2015-06-02 5:07 ` pinskia at gcc dot gnu.org
2015-06-02 6:32 ` juanslayton at dslextreme dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-06-02 5:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the preprocessed source? As I don't have SDL2 installed here.
Also really since you are compiling with redhat's gcc, you should report it to
them.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
2015-06-02 5:07 ` [Bug c/66373] " pinskia at gcc dot gnu.org
@ 2015-06-02 6:32 ` juanslayton at dslextreme dot com
2015-06-02 6:36 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: juanslayton at dslextreme dot com @ 2015-06-02 6:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
--- Comment #3 from John Slayton <juanslayton at dslextreme dot com> ---
Yeah, this will probably have to go to redhat. But I'll give you what I
can. xstar.tar is the installation package for the whole program.
Dependencies are SDL2, SDL2-devel, SDL2_ttf, SDL2_ttf-devel, and freetype.
"preprocessed" was produced by gcc 4.9.2-6 (the version that fails). I can
work up a preprocessed file from the other 2 versions if it would be of any
use. Would take me a while, though, as it involves swapping out the hard
drives that have those versions.
js
On Mon, Jun 1, 2015 at 10:07 PM, pinskia at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
>
> --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> Can you provide the preprocessed source? As I don't have SDL2 installed
> here.
> Also really since you are compiling with redhat's gcc, you should report
> it to
> them.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
2015-06-02 5:07 ` [Bug c/66373] " pinskia at gcc dot gnu.org
2015-06-02 6:32 ` juanslayton at dslextreme dot com
@ 2015-06-02 6:36 ` jakub at gcc dot gnu.org
2015-06-22 18:04 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-02 6:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You should try valgrind on the program, compile/link with
-fsanitize=address,undefined and see what it reports during runtime, try
different compiler options.
If you then still suspect a compiler bug, please try to turn your program into
a self-contained reproducer, see http://gcc.gnu.org/bugs/ for details.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
` (2 preceding siblings ...)
2015-06-02 6:36 ` jakub at gcc dot gnu.org
@ 2015-06-22 18:04 ` mpolacek at gcc dot gnu.org
2015-06-23 20:49 ` juanslayton at dslextreme dot com
2015-06-23 20:50 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-06-22 18:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-06-22
CC| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
` (3 preceding siblings ...)
2015-06-22 18:04 ` mpolacek at gcc dot gnu.org
@ 2015-06-23 20:49 ` juanslayton at dslextreme dot com
2015-06-23 20:50 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: juanslayton at dslextreme dot com @ 2015-06-23 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
--- Comment #5 from John Slayton <juanslayton at dslextreme dot com> ---
valgrind revealed many memory leaks. I plugged most of them and the new
source code compiles and runs well on Red Hat 4.9.2-6.
Conclusion: no bug in gcc version.
thanks for your time.
John Slayton
On Mon, Jun 22, 2015 at 11:04 AM, mpolacek at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
>
> Marek Polacek <mpolacek at gcc dot gnu.org> changed:
>
> What |Removed |Added
>
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |WAITING
> Last reconfirmed| |2015-06-22
> CC| |mpolacek at gcc dot
> gnu.org
> Ever confirmed|0 |1
>
> --
> You are receiving this mail because:
> You reported the bug.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
` (4 preceding siblings ...)
2015-06-23 20:49 ` juanslayton at dslextreme dot com
@ 2015-06-23 20:50 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-06-23 20:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Closing as invalid then.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-23 20:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 4:33 [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine juanslayton at dslextreme dot com
2015-06-02 5:07 ` [Bug c/66373] " pinskia at gcc dot gnu.org
2015-06-02 6:32 ` juanslayton at dslextreme dot com
2015-06-02 6:36 ` jakub at gcc dot gnu.org
2015-06-22 18:04 ` mpolacek at gcc dot gnu.org
2015-06-23 20:49 ` juanslayton at dslextreme dot com
2015-06-23 20:50 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).