public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: wilson@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, thomas.hiller@compaq.com, wilhelm.nuesser@sap.com Subject: Re: optimization/4186: core dump in -O2 on ia32 with attached code (regression to 2.95.*) Date: Mon, 24 Sep 2001 12:46:00 -0000 [thread overview] Message-ID: <20010924194556.26598.qmail@sourceware.cygnus.com> (raw) Synopsis: core dump in -O2 on ia32 with attached code (regression to 2.95.*) State-Changed-From-To: open->analyzed State-Changed-By: wilson State-Changed-When: Mon Sep 24 12:45:55 2001 State-Changed-Why: This is a sibling call optimization bug. This can be worked around by using -fno-optimize-sibling-calls. Note the assembly code for function f1: f1: pushl %ebp movl %esp, %ebp subl $24, %esp movl $11, 16(%ebp) movl 12(%ebp), %eax movl %eax, 8(%ebp) movl 16(%ebp), %eax movl %eax, 12(%ebp) movl %ebp, %esp popl %ebp jmp memcpy When we store the constant 11 on the stack, we accidentally overwrite the second incoming argument (keys) before we read it, and thus we pass 11 as the firt and third arguments to memcpy, which causes memcpy to segfault, since 11 is not a valid address. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4186&database=gcc
next reply other threads:[~2001-09-24 12:46 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-09-24 12:46 wilson [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-12-11 21:46 rodrigc 2001-12-11 21:38 rodrigc 2001-08-31 7:36 wilhelm.nuesser
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=20010924194556.26598.qmail@sourceware.cygnus.com \ --to=wilson@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ --cc=thomas.hiller@compaq.com \ --cc=wilhelm.nuesser@sap.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: linkBe 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).