public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform
@ 2014-03-07 17:18 raghupv30 at gmail dot com
  2014-03-07 18:44 ` [Bug target/60459] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: raghupv30 at gmail dot com @ 2014-03-07 17:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60459

            Bug ID: 60459
           Summary: Crash seen in _Unwind_VRS_Pop() for ARM platform
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raghupv30 at gmail dot com

Hi,

With ARM target platform, crashes in _Unwind_VRS_Pop() during exception
propagation.
Below is the stack trace:

Program terminated with signal 11, Segmentation fault.
#0 _Unwind_VRS_Pop (context=0x1140bf4, regclass=<optimized out>,
discriminator=<optimized out>, representation=_UVRSD_UINT32) at
/home/ben/Katalix/Toolchain/drx780-build/stb_toolchain_2.1/toolchain_build_arm_nofpu/gcc-4.2.1/gcc/config/arm/unwind-arm.c:269
#0 _Unwind_VRS_Pop (context=0x1140bf4, regclass=<optimized out>,
discriminator=<optimized out>, representation=_UVRSD_UINT32) at
/home/ben/Katalix/Toolchain/drx780-build/stb_toolchain_2.1/toolchain_build_arm_nofpu/gcc-4.2.1/gcc/config/arm/unwind-arm.c:269
ptr = 0x4
mask = 16384
i = 14
#1 0x1a5ac6f8 in __gnu_unwind_execute (context=0x1140bc0, uws=0x1140b80) at
/home/ben/Katalix/Toolchain/drx780-build/stb_toolchain_2.1/toolchain_build_arm_nofpu/gcc-4.2.1/gcc/config/arm/pr-support.c:157
op = 16384
set_pc = 0
reg = 1
#2 0x1a5abdf0 in __gnu_unwind_pr_common (state=_US_UNWIND_FRAME_STARTING,
ucbp=0x11416f8, context=0x1140bc0, id=1) at
/home/ben/Katalix/Toolchain/drx780-build/stb_toolchain_2.1/toolchain_build_arm_nofpu/gcc-4.2.1/gcc/config/arm/unwind-arm.c:974
uws =
{data = 0, next = 0xb14aa8, bytes_left = 0 '\000', words_left = 0 '\000'}

data = <optimized out>
offset = 8
len = 18091248
rtti_count = 18091248
phase2_call_unexpected_after_unwind = 9
in_range = <optimized out>
forced_unwind = 18093816
#3 0x1b09d6dc in ?? ()
No symbol table info available.
#4 0x1b09d6dc in ?? ()
No symbol table info available.


Analysing the core dump:


(gdb) x/24i _Unwind_VRS_Pop
   0x1a5ac34c <_Unwind_VRS_Pop>:        push    {r4, r5, r6, r7, r8, r10, lr}
   0x1a5ac350 <_Unwind_VRS_Pop+4>:      mov     r7, r0
   0x1a5ac354 <_Unwind_VRS_Pop+8>:      sub     sp, sp, #140    ; 0x8c
   0x1a5ac358 <_Unwind_VRS_Pop+12>:     mov     r5, r3
   0x1a5ac35c <_Unwind_VRS_Pop+16>:     cmp     r1, #4
   0x1a5ac360 <_Unwind_VRS_Pop+20>:     addls   pc, pc, r1, lsl #2
   0x1a5ac364 <_Unwind_VRS_Pop+24>:     b       0x1a5ac468
<_Unwind_VRS_Pop+284>
   0x1a5ac368 <_Unwind_VRS_Pop+28>:     b       0x1a5ac384 <_Unwind_VRS_Pop+56>
   0x1a5ac36c <_Unwind_VRS_Pop+32>:     b       0x1a5ac3cc
<_Unwind_VRS_Pop+128>
   0x1a5ac370 <_Unwind_VRS_Pop+36>:     b       0x1a5ac37c <_Unwind_VRS_Pop+48>
   0x1a5ac374 <_Unwind_VRS_Pop+40>:     b       0x1a5ac37c <_Unwind_VRS_Pop+48>
   0x1a5ac378 <_Unwind_VRS_Pop+44>:     b       0x1a5ac37c <_Unwind_VRS_Pop+48>
   0x1a5ac37c <_Unwind_VRS_Pop+48>:     mov     r0, #1
   0x1a5ac380 <_Unwind_VRS_Pop+52>:     b       0x1a5ac46c
<_Unwind_VRS_Pop+288>
   0x1a5ac384 <_Unwind_VRS_Pop+56>:     cmp     r3, #0
   0x1a5ac388 <_Unwind_VRS_Pop+60>:     bne     0x1a5ac468
<_Unwind_VRS_Pop+284>
   0x1a5ac38c <_Unwind_VRS_Pop+64>:     lsl     r2, r2, #16
   0x1a5ac390 <_Unwind_VRS_Pop+68>:     ldr     r12, [r0, #56]  ; 0x38
   0x1a5ac394 <_Unwind_VRS_Pop+72>:     lsr     r2, r2, #16
   0x1a5ac398 <_Unwind_VRS_Pop+76>:     mov     r1, r3
   0x1a5ac39c <_Unwind_VRS_Pop+80>:     mov     lr, #1
   0x1a5ac3a0 <_Unwind_VRS_Pop+84>:     ands    r3, r2, lr, lsl r1
=> 0x1a5ac3a4 <_Unwind_VRS_Pop+88>:     ldrne   r3, [r12], #4
   0x1a5ac3a8 <_Unwind_VRS_Pop+92>:     add     r0, r7, r1, lsl #2

(gdb) info locals
ptr = 0xfa
mask = 26624 = 0x6800
i = 11

print ptr
$1 = (_uw *) 0xfa
(gdb) print *ptr
Cannot access memory at address 0xfa
(gdb) info reg
r0             0x11a6be8        18508776
r1             0xb      11
r2             0x6800   26624
r3             0x800    2048
r4             0x86800  550912
r5             0x0      0
r6             0x11a6bc0        18508736
r7             0x11a6bc0        18508736
r8             0x0      0
r9             0xff0    4080
r10            0x11a6b44        18508612
r11            0x1a5b5f2c       442195756
r12            0xfa     250
sp             0x11a6a90        0x11a6a90
lr             0x1      1
pc             0x1a5ac3a4       0x1a5ac3a4 <_Unwind_VRS_Pop+88>
cpsr           0x10     16


Using the gcc in http://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-core-4.2.1.tar.bz2

Is anyone aware of the reason for this crash in _Unwind_VRS_Pop() for ARM
platform?


Thanks in advance

-Raghu


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/60459] Crash seen in _Unwind_VRS_Pop() for ARM platform
  2014-03-07 17:18 [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform raghupv30 at gmail dot com
@ 2014-03-07 18:44 ` pinskia at gcc dot gnu.org
  2014-03-10  8:07 ` ramana at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-07 18:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60459

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
           Severity|blocker                     |normal

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you try a newer version than GCC 4.2.1?

Also can you provide the exact options you compiled your source with?  And the
exact configure options you configured GCC with?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/60459] Crash seen in _Unwind_VRS_Pop() for ARM platform
  2014-03-07 17:18 [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform raghupv30 at gmail dot com
  2014-03-07 18:44 ` [Bug target/60459] " pinskia at gcc dot gnu.org
@ 2014-03-10  8:07 ` ramana at gcc dot gnu.org
  2014-03-17 17:12 ` raghupv30 at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-10  8:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60459

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-03-10
                 CC|                            |ramana at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
4.2.1 is completely unsupported. There is not enough information here to try
and reproduce the issue either - can you please follow instructions here
http://gcc.gnu.org/bugs/ for reporting issues with the compiler ?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/60459] Crash seen in _Unwind_VRS_Pop() for ARM platform
  2014-03-07 17:18 [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform raghupv30 at gmail dot com
  2014-03-07 18:44 ` [Bug target/60459] " pinskia at gcc dot gnu.org
  2014-03-10  8:07 ` ramana at gcc dot gnu.org
@ 2014-03-17 17:12 ` raghupv30 at gmail dot com
  2014-04-09 10:01 ` ramana at gcc dot gnu.org
  2014-04-09 12:04 ` murali.marimekala at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: raghupv30 at gmail dot com @ 2014-03-17 17:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60459

--- Comment #3 from Raghu <raghupv30 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> Can you try a newer version than GCC 4.2.1?
> 
> Also can you provide the exact options you compiled your source with?  And
> the exact configure options you configured GCC with?

Hi,

I am using the GCC which we got from the toolchain for ARM target.
Below are config options with which GCC was configured.

./gcc -B./ -v
Using built-in specs.
Target: arm-linux-uclibcgnueabi
Configured with:
/home/ben/Katalix/toolchain/arm-toolchain/stb_toolchain_2.1/toolchain_build_arm_nofpu/gcc-4.2.1/configure
--prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=arm-linux-uclibcgnueabi --enable-languages=c,c++
--with-sysroot=/opt/toolchains/tools-4.2.1-arm9
--with-build-time-tools=/opt/toolchains/tools-4.2.1-arm9/usr/arm-linux-uclibcgnueabi/bin
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared
--with-gmp=/home/ben/Katalix/toolchain/arm-toolchain/stb_toolchain_2.1/toolchain_build_arm_nofpu/gmp
--with-mpfr=/home/ben/Katalix/toolchain/arm-toolchain/stb_toolchain_2.1/toolchain_build_arm_nofpu/mpfr
--disable-nls --enable-threads --enable-multilib --with-float=soft
--with-tune=arm920t
Thread model: posix
gcc version 4.2.1


Please advice if the above configure options are correct?

Any thoughts why the crash in _Unwind_VRS_Pop() is seen?

We don't have another version of ARM toolchain. Is there any stable prebuild
toolchain for ARM platform to use?

Thanks,
Raghu


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/60459] Crash seen in _Unwind_VRS_Pop() for ARM platform
  2014-03-07 17:18 [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform raghupv30 at gmail dot com
                   ` (2 preceding siblings ...)
  2014-03-17 17:12 ` raghupv30 at gmail dot com
@ 2014-04-09 10:01 ` ramana at gcc dot gnu.org
  2014-04-09 12:04 ` murali.marimekala at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-09 10:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60459

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---

> This particular __longjump.S is not available in toolchain 4.2.1. I searched
> for relevant code and couldnt find it. 

That appears to be in the glibc sources not in the GCC sources assuming that is
the problem. It does look suspicious but doesn't guarantee that to be the issue
unless you know longjmp is being called in the testcase you have. Work out if
the test case shown in the link fails identically to yours and work out if it
fails in the same manner with the same root cause. If so, that's your issue and
it is nothing to do with the compiler or libgcc's unwind routines.

Use git blame or any other revision control tools on the glibc sources that you
have to work out where that comes from and port the solution there not in the
gcc sources.

Despite repeated requests to produce a testcase that shows this on currently
maintained compilers that shows this to be a GCC problem, there have been none. 

Given this situation, I'm going to reject this issue as INVALID - if you have
an issue, either reopen the issue or create a new one with the exact
information we require.

regards
Ramana


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/60459] Crash seen in _Unwind_VRS_Pop() for ARM platform
  2014-03-07 17:18 [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform raghupv30 at gmail dot com
                   ` (3 preceding siblings ...)
  2014-04-09 10:01 ` ramana at gcc dot gnu.org
@ 2014-04-09 12:04 ` murali.marimekala at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: murali.marimekala at gmail dot com @ 2014-04-09 12:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60459

--- Comment #7 from Murali <murali.marimekala at gmail dot com> ---
Hi Ramana,

Thanks for your response and inputs.

We will try working out a testcase to reproduce this issue.

Murali


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-09 12:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-07 17:18 [Bug c++/60459] New: Crash seen in _Unwind_VRS_Pop() for ARM platform raghupv30 at gmail dot com
2014-03-07 18:44 ` [Bug target/60459] " pinskia at gcc dot gnu.org
2014-03-10  8:07 ` ramana at gcc dot gnu.org
2014-03-17 17:12 ` raghupv30 at gmail dot com
2014-04-09 10:01 ` ramana at gcc dot gnu.org
2014-04-09 12:04 ` murali.marimekala at gmail dot com

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).