public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "changpeng.fang at amd dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug regression/47037] 465.tonto Segmentation Fault in memset Date: Wed, 22 Dec 2010 00:55:00 -0000 [thread overview] Message-ID: <bug-47037-4-mjXBunYS0b@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47037-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47037 --- Comment #1 from Changpeng Fang <changpeng.fang at amd dot com> 2010-12-22 00:55:35 UTC --- Initially I thought it is a glibc bug, but seems it is not: (1) A workaround flag is -fno-caller-saves (2) The compile binary (NOTE: with -static) runs correctly on other systems The bad code is in atom.fppized: subroutine set_label_and_atomic_number(self,label) type(atom_type) :: self !Set an type(atom_type) "label" and extract the atomic number from it. character(*) :: label integer(kind=kind(1)) :: lensym,z character(128) :: symbol logical(kind=kind(.true.)) :: error self%label = label The memset is for the label copy: .LBB633: .loc 1 967 0 discriminator 2 movq %r13, %rdx movq %rbx, %rsi movq %rsp, %rdi call memcpy movl $128, %edx leaq (%rsp,%r13), %rdi ## <---- bad address movl $32, %esi subq %r13, %rdx movq %rsp, %r12 call memset jmp .L707 .LVL646: .p2align 4,,10 .p2align 3 .L717: Looks like %rsp value is not correct (stack corrupted).
next prev parent reply other threads:[~2010-12-22 0:55 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-22 0:44 [Bug regression/47037] New: " changpeng.fang at amd dot com 2010-12-22 0:55 ` changpeng.fang at amd dot com [this message] 2010-12-23 9:14 ` [Bug regression/47037] " tkoenig at gcc dot gnu.org 2010-12-23 18:05 ` [Bug regression/47037] 465.tonto Segmentation Fault in memset with -fcaller-saves (default at -O2 or higher) changpeng.fang at amd dot com 2010-12-23 18:09 ` changpeng.fang at amd dot com 2010-12-28 16:07 ` rguenth at gcc dot gnu.org 2011-01-03 22:00 ` changpeng.fang at amd dot com 2011-01-03 22:04 ` hjl.tools at gmail dot com 2011-01-03 22:30 ` changpeng.fang at amd dot com 2012-02-02 8:13 ` pinskia at gcc dot gnu.org
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=bug-47037-4-mjXBunYS0b@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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).