public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "matz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/29166] broken unwind information for many life variables resulting in register corruption Date: Thu, 21 Sep 2006 13:40:00 -0000 [thread overview] Message-ID: <20060921134038.9919.qmail@sourceware.org> (raw) In-Reply-To: <bug-29166-12182@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from matz at gcc dot gnu dot org 2006-09-21 13:40 ------- Hmpf. I wonder if there's any tool to really inspect the unwind info, like it is possible for dwarf. But readelf doesn't help very much: % readelf -wf a.out <nothing, no wonder, it's no dwarf> % readelf -u a.out ... <_Z4doItv>: [0x4000000000000b00-0x4000000000003ce0], info at +0x87b0 v1, flags=0x0 (), len=40 bytes R2:prologue_gr(mask=[psp],grsave=r119,rlen=49) P5:frgr_mem(grmask=[r4,r5,r6,r7],frmask=[f2,f3,f4,f5,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31]) P4:spill_mask(imask=[---,---,---,---,rr-,rr-,-f-,ff-,ff-,ff-,ff-,ff-,ff-,ff-,ff-,ff-,f]) P7:mem_stack_v(t=3) P7:unat_when(t=7) P7:unat_psprel(pspoff=0x10-0x180) P7:pfs_when(t=9) P7:pfs_psprel(pspoff=0x10-0x178) P7:rp_when(t=18) P7:rp_psprel(pspoff=0x10-0x148) R3:body(rlen=2345) R1:prologue(rlen=0) R1:prologue(rlen=0) <_Z4testv>: [0x4000000000003ce0-0x4000000000003db0], info at +0x87e0 v1, flags=0x3 ( ehandler uhandler), len=16 bytes R2:prologue_gr(mask=[rp,ar.pfs,psp],grsave=r32,rlen=5) P7:pfs_when(t=0) P7:mem_stack_v(t=1) P7:rp_when(t=4) R3:body(rlen=34) B2:epilogue(t=2,ecount=0) R1:prologue(rlen=0) R1:prologue(rlen=0) R1:prologue(rlen=0) I traced the things in libunwind a bit, and know that the one writing the wrong location of R4-7 into context->loc is the IA64_INSN_ADD_PSP_NAT unwind script instruction, interpreted in _ULia64_find_save_locs (in run_script actually). And it happens while context still is set to the doIt() function. But I have no idea, how that script is generated, or how it relates to the assembler file. For instance, the start of doIt() has this code: .save.g 0x1 .mem.offset 344, 0 // st8.spill [r18] = r4, 16 //, ;; .save.g 0x2 .mem.offset 336, 0 // st8.spill [r17] = r5, 16 //, .save.g 0x4 .mem.offset 328, 0 // st8.spill [r18] = r6, 16 //, ;; .save.g 0x8 .mem.offset 320, 0 // st8.spill [r17] = r7, 16 //, I assume (because there are no explicit unwind sections in the assembler source) that these .save.g and .mem.offset somehow are pseudo instructions which somehow produce unwind info. But I'm at a loss here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29166
next prev parent reply other threads:[~2006-09-21 13:40 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-09-21 13:34 [Bug middle-end/29166] New: " matz at gcc dot gnu dot org 2006-09-21 13:35 ` [Bug middle-end/29166] " matz at gcc dot gnu dot org 2006-09-21 13:39 ` matz at gcc dot gnu dot org 2006-09-21 13:40 ` matz at gcc dot gnu dot org [this message] 2006-11-15 15:52 ` [Bug target/29166] " matz at gcc dot gnu dot org 2006-11-24 22:20 ` patchapp at dberlin dot org 2006-11-24 22:31 ` pinskia at gcc dot gnu dot org 2007-01-01 22:03 ` schwab at gcc dot gnu dot org 2007-01-01 22:07 ` schwab at gcc dot gnu dot org 2007-01-01 22:11 ` schwab at suse dot de
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=20060921134038.9919.qmail@sourceware.org \ --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).