public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Koenig <ig25@mvmap66.ciw.uni-karlsruhe.de>
To: egcs@cygnus.com
Subject: cse.c bug
Date: Tue, 30 Sep 1997 08:57:00 -0000	[thread overview]
Message-ID: <199709301557.QAA02401@mvmap66.ciw.uni-karlsruhe.de> (raw)

The following, rather minimalistic program causes an assignment of
a garbage value in cse.c, caught by checkergcc, with 970924 with Haifa
on a Linux-486-libc6 system, when compiled with optimization.

$ cat hello.i
int main()
{
    return 0;
}
$ cc1 -O hello.i

[...]

From Checker (pid:17317): (rus) read uninitialized byte(s) in the stack.
When Reading 4 byte(s) at address 0xbfffb40c, inside the stack.
Stack frames are:
        pc=0x08295537 in cse_insn() at cse.c:7512
        pc=0x08299d59 in cse_basic_block() at cse.c:8431
        pc=0x082995c6 in cse_main() at cse.c:8313
        pc=0x080bb3d6 in rest_of_compilation() at ./toplev.c:3208
        pc=0x08086f62 in finish_function() at c-decl.c:7047
        pc=0x0805aa31 in yyparse() at c-parse.y:316
        pc=0x080b8329 in compile_file() at ./toplev.c:2486
        pc=0x080c035c in main() at ./toplev.c:4331
        pc=0x08058f6f in checker_text_end() at ./end.c:9

The statement in question is

  prev_insn_cc0_mode = this_insn_cc0_mode;

It appears that this_insn_cc0_mode was never assigned a value, so it
contains garbage, which probably is suboptimal.

[Did I mention that playing around with Checker is fun? :-]
-- 
Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
The joy of engineering is to find a straight line on a double
logarithmic diagram.

WARNING: multiple messages have this Message-ID
From: Thomas Koenig <ig25@mvmap66.ciw.uni-karlsruhe.de>
To: egcs@cygnus.com
Subject: cse.c bug
Date: Mon, 06 Oct 1997 11:12:00 -0000	[thread overview]
Message-ID: <199709301557.QAA02401@mvmap66.ciw.uni-karlsruhe.de> (raw)
Message-ID: <19971006111200.ppkEzcLgP5FokLfXjT0oTbVvA3JOQHg6-ljufpLLW44@z> (raw)

The following, rather minimalistic program causes an assignment of
a garbage value in cse.c, caught by checkergcc, with 970924 with Haifa
on a Linux-486-libc6 system, when compiled with optimization.

$ cat hello.i
int main()
{
    return 0;
}
$ cc1 -O hello.i

[...]

From Checker (pid:17317): (rus) read uninitialized byte(s) in the stack.
When Reading 4 byte(s) at address 0xbfffb40c, inside the stack.
Stack frames are:
        pc=0x08295537 in cse_insn() at cse.c:7512
        pc=0x08299d59 in cse_basic_block() at cse.c:8431
        pc=0x082995c6 in cse_main() at cse.c:8313
        pc=0x080bb3d6 in rest_of_compilation() at ./toplev.c:3208
        pc=0x08086f62 in finish_function() at c-decl.c:7047
        pc=0x0805aa31 in yyparse() at c-parse.y:316
        pc=0x080b8329 in compile_file() at ./toplev.c:2486
        pc=0x080c035c in main() at ./toplev.c:4331
        pc=0x08058f6f in checker_text_end() at ./end.c:9

The statement in question is

  prev_insn_cc0_mode = this_insn_cc0_mode;

It appears that this_insn_cc0_mode was never assigned a value, so it
contains garbage, which probably is suboptimal.

[Did I mention that playing around with Checker is fun? :-]
--
Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
The joy of engineering is to find a straight line on a double
logarithmic diagram.

             reply	other threads:[~1997-09-30  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-30  8:57 Thomas Koenig [this message]
1997-09-30 13:36 ` Thomas Koenig
1997-09-30 14:06   ` Joe Buck
1997-09-30 22:49 ` Jeffrey A Law
1997-10-06 11:12 ` Thomas Koenig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199709301557.QAA02401@mvmap66.ciw.uni-karlsruhe.de \
    --to=ig25@mvmap66.ciw.uni-karlsruhe.de \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).