public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/97431] New: [SH] Python crashes with 'Segmentation fault with -finline-small-functions
@ 2020-10-15  0:05 glaubitz at physik dot fu-berlin.de
  2020-10-15  0:36 ` [Bug target/97431] " bugdal at aerifal dot cx
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-10-15  0:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97431

            Bug ID: 97431
           Summary: [SH] Python crashes with 'Segmentation fault with
                    -finline-small-functions
           Product: gcc
           Version: 10.2.0
               URL: https://buildd.debian.org/status/fetch.php?pkg=python3
                    .9&arch=sh4&ver=3.9.0-1&stamp=1601938112&raw=0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glaubitz at physik dot fu-berlin.de
                CC: bugdal at aerifal dot cx, kkojima at gcc dot gnu.org,
                    olegendo at gcc dot gnu.org, ysato at users dot sourceforge.jp
  Target Milestone: ---
            Target: sh*-*-*

Building Python 3.9 on Debian/sh4 unstable with -finline-small-functions causes
the Python interpreter to segfault during build.

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
long_richcompare (self=0x2a15f490, other=0x2a15f4a0, op=<optimized out>) at
../Objects/longobject.c:3031
3031    long_richcompare(PyObject *self, PyObject *other, int op)
(gdb) bt
#0  long_richcompare (self=0x2a15f490, other=0x2a15f4a0, op=<optimized out>) at
../Objects/longobject.c:3031
#1  0x2964f740 in do_richcompare (op=5, w=0x2a15f4a0, v=0x2a15f490,
tstate=0x4154e8) at ../Objects/object.c:673
#2  PyObject_RichCompare (v=0x2a15f490, w=0x2a15f4a0, op=5) at
../Objects/object.c:723
#3  0x295cde98 in _PyEval_EvalFrameDefault (tstate=<optimized out>,
f=<optimized out>, throwflag=<optimized out>)
    at ../Python/ceval.c:2978
#4  0x296d689c in _PyEval_EvalFrame (throwflag=0, f=0x2a19f448,
tstate=0x4154e8) at ../Include/internal/pycore_ceval.h:40
#5  _PyEval_EvalCode (tstate=0x4154e8, _co=<optimized out>, globals=<optimized
out>, locals=<optimized out>, 
    args=0x2a1b5458, argcount=3, kwnames=0x0, kwargs=0x2a1b5464, kwcount=0,
kwstep=1, defs=0x0, defcount=0, 
    kwdefs=0x2a1a3d70, closure=0x0, name=0x2a198470, qualname=0x2a198470) at
../Python/ceval.c:4299
#6  0x2960d8ac in _PyFunction_Vectorcall (func=<optimized out>,
stack=0x2a1b5458, nargsf=<optimized out>, 
    kwnames=<optimized out>) at ../Objects/call.c:395
#7  0x295d1ae0 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized
out>, args=<optimized out>, 
    callable=0x2a170e80, tstate=<optimized out>) at
../Include/cpython/abstract.h:118
#8  PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=<optimized
out>, callable=0x2a170e80)
    at ../Include/cpython/abstract.h:127
#9  call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic
pointer>, tstate=0x4154e8)
    at ../Python/ceval.c:5044
#10 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>,
throwflag=<optimized out>)
    at ../Python/ceval.c:3490
#11 0x295cac90 in _PyEval_EvalFrame (throwflag=0, f=0x2a1b5318,
tstate=0x4154e8) at ../Include/internal/pycore_ceval.h:40
#12 function_code_fastcall (tstate=0x4154e8, co=<optimized out>,
args=0x2a1b1574, nargs=1, globals=0x2a1a3ca8)
    at ../Objects/call.c:329
#13 0x2960d990 in _PyFunction_Vectorcall (func=<optimized out>,
stack=0x2a1b1570, nargsf=<optimized out>, 
    kwnames=<optimized out>) at ../Objects/call.c:366
#14 0x295d1ae0 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized
out>, args=<optimized out>, 
    callable=0x2a1af460, tstate=<optimized out>) at
../Include/cpython/abstract.h:118
#15 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=<optimized
out>, callable=0x2a1af460)
    at ../Include/cpython/abstract.h:127

Disassembly:

(gdb) x/-10i $pc
   0x296318d4 <long_richcompare+132>:   rts
   0x296318d6 <long_richcompare+134>:   mov.l   @r15+,r8
   0x296318d8 <long_richcompare+136>:   mov.l   0x296318f4
<long_richcompare+164>,r0    ! 0x8b8
   0x296318da <long_richcompare+138>:   mov.l   @(r0,r12),r0
   0x296318dc <long_richcompare+140>:   mov.l   @r0,r1
   0x296318de <long_richcompare+142>:   add     #1,r1
   0x296318e0 <long_richcompare+144>:   mov.l   r1,@r0
   0x296318e2 <long_richcompare+146>:   mov.l   @r15+,r12
   0x296318e4 <long_richcompare+148>:   rts
   0x296318e6 <long_richcompare+150>:   mov.l   @r15+,r8
(gdb) x/10i $pc
=> 0x296318e8 <long_richcompare+152>:   mov.l   r9,@(16,r13)
   0x296318ea <long_richcompare+154>:   mov.b   @(r0,r3),r0
   0x296318ec <long_richcompare+156>:   .word 0x0000
   0x296318ee <long_richcompare+158>:   .word 0x0100
   0x296318f0 <long_richcompare+160>:   .word 0x0a70
   0x296318f2 <long_richcompare+162>:   .word 0x0000
   0x296318f4 <long_richcompare+164>:   .word 0x08b8
   0x296318f6 <long_richcompare+166>:   .word 0x0000
   0x296318f8 <long_richcompare+168>:   mova    0x29631904
<long_richcompare+180>,r0
   0x296318fa <long_richcompare+170>:   add     r6,r6
(gdb)

Full build log in:
https://buildd.debian.org/status/fetch.php?pkg=python3.9&arch=sh4&ver=3.9.0-1&stamp=1601938112&raw=0

Let me know where to dig next.

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

end of thread, other threads:[~2020-10-18 18:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  0:05 [Bug target/97431] New: [SH] Python crashes with 'Segmentation fault with -finline-small-functions 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
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

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