public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "glaubitz at physik dot fu-berlin.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/97431] [SH] Python crashes with 'Segmentation fault with -finline-small-functions
Date: Thu, 15 Oct 2020 08:03:09 +0000 [thread overview]
Message-ID: <bug-97431-4-amlBCUJNpz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97431-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97431
--- Comment #3 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Rich Felker from comment #1)
> Do you have a complete disassembly of the function it crashed in and
> register dump at the point of crash? That would help.
Register dump:
(gdb) info registers
r0 0x296318e8 694360296
r1 0x1 1
r2 0x1041400 17044480
r3 0x3e8 1000
r4 0x2a15f490 706081936
r5 0x2a15f4a0 706081952
r6 0x5 5
r7 0x0 0
r8 0xffffffff -1
r9 0x4154e8 4281576
r10 0x2a15f490 706081936
r11 0x5 5
r12 0x299f367c 698300028
r13 0x8b8 2232
r14 0x2a15f4a0 706081952
r15 0x7bffea64 2080369252
pc 0x296318e8 694360296
pr 0x2964f740 694482752
gbr 0x29576d78 693595512
mach 0xa 10
macl 0x0 0
(gdb)
Disassembled function:
Dump of assembler code for function long_richcompare:
0x29631850 <+0>: mov.l r8,@-r15
0x29631852 <+2>: mova 0x296318e8 <long_richcompare+152>,r0
0x29631854 <+4>: mov.l r12,@-r15
0x29631856 <+6>: mov.l @(4,r4),r1
0x29631858 <+8>: mov.l 0x296318e8 <long_richcompare+152>,r12 !
0x3c1d94
0x2963185a <+10>: add #64,r1
0x2963185c <+12>: mov.l @(20,r1),r2
0x2963185e <+14>: mov.l 0x296318ec <long_richcompare+156>,r1 !
0x1000000
0x29631860 <+16>: tst r1,r2
0x29631862 <+18>: bt.s 0x296318d8 <long_richcompare+136>
0x29631864 <+20>: add r0,r12
0x29631866 <+22>: mov.l @(4,r5),r2
0x29631868 <+24>: add #64,r2
0x2963186a <+26>: mov.l @(20,r2),r2
0x2963186c <+28>: tst r1,r2
0x2963186e <+30>: bt.s 0x296318d8 <long_richcompare+136>
0x29631870 <+32>: cmp/eq r5,r4
0x29631872 <+34>: bt.s 0x29631940 <long_richcompare+240>
0x29631874 <+36>: mov #5,r1
0x29631876 <+38>: mov.l @(8,r4),r7
0x29631878 <+40>: mov.l @(8,r5),r1
0x2963187a <+42>: mov r7,r8
0x2963187c <+44>: cmp/eq r1,r7
0x2963187e <+46>: bf.s 0x296318e8 <long_richcompare+152>
0x29631880 <+48>: sub r1,r8
0x29631882 <+50>: cmp/pz r7
0x29631884 <+52>: mov r7,r1
0x29631886 <+54>: bt 0x2963188a <long_richcompare+58>
0x29631888 <+56>: neg r7,r1
0x2963188a <+58>: mov r1,r2
0x2963188c <+60>: add r2,r2
0x2963188e <+62>: add #12,r2
0x29631890 <+64>: add r2,r4
0x29631892 <+66>: add r2,r5
0x29631894 <+68>: mov r1,r2
0x29631896 <+70>: mov #-1,r3
0x29631898 <+72>: add #-1,r1
0x2963189a <+74>: cmp/ge r3,r1
0x2963189c <+76>: bf.s 0x2963193c <long_richcompare+236>
0x2963189e <+78>: add #1,r2
0x296318a0 <+80>: dt r2
0x296318a2 <+82>: bt.s 0x296318ba <long_richcompare+106>
0x296318a4 <+84>: cmp/pz r7
0x296318a6 <+86>: add #-2,r4
0x296318a8 <+88>: add #-2,r5
0x296318aa <+90>: mov.w @r4,r1
0x296318ac <+92>: mov.w @r5,r3
0x296318ae <+94>: sub r3,r1
0x296318b0 <+96>: exts.w r1,r1
0x296318b2 <+98>: tst r1,r1
0x296318b4 <+100>: bt.s 0x296318a0 <long_richcompare+80>
0x296318b6 <+102>: cmp/pz r7
0x296318b8 <+104>: mov r1,r8
0x296318ba <+106>: bt 0x296318be <long_richcompare+110>
0x296318bc <+108>: neg r8,r8
0x296318be <+110>: mov #5,r1
0x296318c0 <+112>: cmp/hi r1,r6
0x296318c2 <+114>: bf 0x296318f8 <long_richcompare+168>
0x296318c4 <+116>: cmp/pz r8
0x296318c6 <+118>: bt 0x29631914 <long_richcompare+196>
0x296318c8 <+120>: mov.l 0x296318f0 <long_richcompare+160>,r0 ! 0xa70
0x296318ca <+122>: mov.l @(r0,r12),r0
0x296318cc <+124>: mov.l @r0,r1
0x296318ce <+126>: add #1,r1
0x296318d0 <+128>: mov.l r1,@r0
0x296318d2 <+130>: mov.l @r15+,r12
0x296318d4 <+132>: rts
0x296318d6 <+134>: mov.l @r15+,r8
0x296318d8 <+136>: mov.l 0x296318f4 <long_richcompare+164>,r0 ! 0x8b8
0x296318da <+138>: mov.l @(r0,r12),r0
0x296318dc <+140>: mov.l @r0,r1
0x296318de <+142>: add #1,r1
0x296318e0 <+144>: mov.l r1,@r0
0x296318e2 <+146>: mov.l @r15+,r12
0x296318e4 <+148>: rts
0x296318e6 <+150>: mov.l @r15+,r8
=> 0x296318e8 <+152>: mov.l r9,@(16,r13)
0x296318ea <+154>: mov.b @(r0,r3),r0
0x296318ec <+156>: .word 0x0000
0x296318ee <+158>: .word 0x0100
0x296318f0 <+160>: .word 0x0a70
0x296318f2 <+162>: .word 0x0000
0x296318f4 <+164>: .word 0x08b8
0x296318f6 <+166>: .word 0x0000
0x296318f8 <+168>: mova 0x29631904 <long_richcompare+180>,r0
0x296318fa <+170>: add r6,r6
0x296318fc <+172>: mov.w @(r0,r6),r6
0x296318fe <+174>: braf r6
0x29631900 <+176>: nop
0x29631902 <+178>: nop
0x29631904 <+180>: mov.l @(r0,r0),r0
0x29631906 <+182>: stc vbr,r0
0x29631908 <+184>: mov.l @(r0,r5),r0
0x2963190a <+186>: .word 0x0032
0x2963190c <+188>: sts pr,r0
0x2963190e <+190>: .word 0xffc2
0x29631910 <+192>: cmp/pz r8
0x29631912 <+194>: bt 0x296318c8 <long_richcompare+120>
0x29631914 <+196>: mov.l 0x29631950 <long_richcompare+256>,r0 ! 0xb80
0x29631916 <+198>: mov.l @(r0,r12),r0
0x29631918 <+200>: mov.l @r0,r1
0x2963191a <+202>: add #1,r1
0x2963191c <+204>: mov.l r1,@r0
0x2963191e <+206>: mov.l @r15+,r12
0x29631920 <+208>: rts
0x29631922 <+210>: mov.l @r15+,r8
0x29631924 <+212>: cmp/pl r8
0x29631926 <+214>: bt 0x296318c8 <long_richcompare+120>
0x29631928 <+216>: bra 0x29631914 <long_richcompare+196>
0x2963192a <+218>: nop
0x2963192c <+220>: cmp/pl r8
0x2963192e <+222>: bt 0x29631914 <long_richcompare+196>
0x29631930 <+224>: bra 0x296318c8 <long_richcompare+120>
0x29631932 <+226>: nop
0x29631934 <+228>: tst r8,r8
0x29631936 <+230>: bf 0x29631914 <long_richcompare+196>
0x29631938 <+232>: bra 0x296318c8 <long_richcompare+120>
0x2963193a <+234>: nop
0x2963193c <+236>: bra 0x296318a0 <long_richcompare+80>
0x2963193e <+238>: mov #1,r2
0x29631940 <+240>: cmp/hi r1,r6
0x29631942 <+242>: bt 0x296318e8 <long_richcompare+152>
0x29631944 <+244>: mova 0x29631954 <long_richcompare+260>,r0
0x29631946 <+246>: add r6,r6
0x29631948 <+248>: mov.w @(r0,r6),r6
0x2963194a <+250>: braf r6
0x2963194c <+252>: nop
0x2963194e <+254>: nop
0x29631950 <+256>: .word 0x0b80
0x29631952 <+258>: .word 0x0000
0x29631954 <+260>: .word 0xff7a
0x29631956 <+262>: .word 0xffc6
0x29631958 <+264>: .word 0xffc6
0x2963195a <+266>: .word 0xff7a
0x2963195c <+268>: .word 0xff7a
0x2963195e <+270>: .word 0xffc6
0x29631960 <+272>: tst r8,r8
0x29631962 <+274>: bf 0x296318c8 <long_richcompare+120>
0x29631964 <+276>: bra 0x29631914 <long_richcompare+196>
0x29631966 <+278>: nop
End of assembler dump.
C source of function can be found here:
https://sources.debian.org/src/python3.9/3.9.0-1/Objects/longobject.c/?hl=3031#L3031
next prev parent reply other threads:[~2020-10-15 8:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 0:05 [Bug target/97431] New: " glaubitz at physik dot fu-berlin.de
2020-10-15 0:36 ` [Bug target/97431] " bugdal at aerifal dot cx
2020-10-15 1:53 ` ysato at users dot sourceforge.jp
2020-10-15 8:03 ` glaubitz at physik dot fu-berlin.de [this message]
2020-10-15 13:39 ` olegendo at gcc dot gnu.org
2020-10-15 13:47 ` glaubitz at physik dot fu-berlin.de
2020-10-15 14:03 ` olegendo at gcc dot gnu.org
2020-10-15 14:15 ` glaubitz at physik dot fu-berlin.de
2020-10-18 18:55 ` danglin 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-97431-4-amlBCUJNpz@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: 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).