From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7E60B3945049; Thu, 15 Oct 2020 00:05:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E60B3945049 From: "glaubitz at physik dot fu-berlin.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97431] New: [SH] Python crashes with 'Segmentation fault with -finline-small-functions Date: Thu, 15 Oct 2020 00:05:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glaubitz at physik dot fu-berlin.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_file_loc bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2020 00:05:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97431 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=3Dpython3 .9&arch=3Dsh4&ver=3D3.9.0-1&stamp=3D1601938112&raw=3D0 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 sourcef= orge.jp Target Milestone: --- Target: sh*-*-* Building Python 3.9 on Debian/sh4 unstable with -finline-small-functions ca= uses the Python interpreter to segfault during build. Backtrace: Program received signal SIGSEGV, Segmentation fault. long_richcompare (self=3D0x2a15f490, other=3D0x2a15f4a0, op=3D) at ../Objects/longobject.c:3031 3031 long_richcompare(PyObject *self, PyObject *other, int op) (gdb) bt #0 long_richcompare (self=3D0x2a15f490, other=3D0x2a15f4a0, op=3D) at ../Objects/longobject.c:3031 #1 0x2964f740 in do_richcompare (op=3D5, w=3D0x2a15f4a0, v=3D0x2a15f490, tstate=3D0x4154e8) at ../Objects/object.c:673 #2 PyObject_RichCompare (v=3D0x2a15f490, w=3D0x2a15f4a0, op=3D5) at ../Objects/object.c:723 #3 0x295cde98 in _PyEval_EvalFrameDefault (tstate=3D, f=3D, throwflag=3D) at ../Python/ceval.c:2978 #4 0x296d689c in _PyEval_EvalFrame (throwflag=3D0, f=3D0x2a19f448, tstate=3D0x4154e8) at ../Include/internal/pycore_ceval.h:40 #5 _PyEval_EvalCode (tstate=3D0x4154e8, _co=3D, globals=3D<= optimized out>, locals=3D,=20 args=3D0x2a1b5458, argcount=3D3, kwnames=3D0x0, kwargs=3D0x2a1b5464, kw= count=3D0, kwstep=3D1, defs=3D0x0, defcount=3D0,=20 kwdefs=3D0x2a1a3d70, closure=3D0x0, name=3D0x2a198470, qualname=3D0x2a1= 98470) at ../Python/ceval.c:4299 #6 0x2960d8ac in _PyFunction_Vectorcall (func=3D, stack=3D0x2a1b5458, nargsf=3D,=20 kwnames=3D) at ../Objects/call.c:395 #7 0x295d1ae0 in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D,=20 callable=3D0x2a170e80, tstate=3D) at ../Include/cpython/abstract.h:118 #8 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D, callable=3D0x2a170e80) at ../Include/cpython/abstract.h:127 #9 call_function (kwnames=3D0x0, oparg=3D, pp_stack=3D, tstate=3D0x4154e8) at ../Python/ceval.c:5044 #10 _PyEval_EvalFrameDefault (tstate=3D, f=3D, throwflag=3D) at ../Python/ceval.c:3490 #11 0x295cac90 in _PyEval_EvalFrame (throwflag=3D0, f=3D0x2a1b5318, tstate=3D0x4154e8) at ../Include/internal/pycore_ceval.h:40 #12 function_code_fastcall (tstate=3D0x4154e8, co=3D, args=3D0x2a1b1574, nargs=3D1, globals=3D0x2a1a3ca8) at ../Objects/call.c:329 #13 0x2960d990 in _PyFunction_Vectorcall (func=3D, stack=3D0x2a1b1570, nargsf=3D,=20 kwnames=3D) at ../Objects/call.c:366 #14 0x295d1ae0 in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D,=20 callable=3D0x2a1af460, tstate=3D) at ../Include/cpython/abstract.h:118 #15 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D, callable=3D0x2a1af460) at ../Include/cpython/abstract.h:127 Disassembly: (gdb) x/-10i $pc 0x296318d4 : rts 0x296318d6 : mov.l @r15+,r8 0x296318d8 : mov.l 0x296318f4 ,r0 ! 0x8b8 0x296318da : mov.l @(r0,r12),r0 0x296318dc : mov.l @r0,r1 0x296318de : add #1,r1 0x296318e0 : mov.l r1,@r0 0x296318e2 : mov.l @r15+,r12 0x296318e4 : rts 0x296318e6 : mov.l @r15+,r8 (gdb) x/10i $pc =3D> 0x296318e8 : mov.l r9,@(16,r13) 0x296318ea : mov.b @(r0,r3),r0 0x296318ec : .word 0x0000 0x296318ee : .word 0x0100 0x296318f0 : .word 0x0a70 0x296318f2 : .word 0x0000 0x296318f4 : .word 0x08b8 0x296318f6 : .word 0x0000 0x296318f8 : mova 0x29631904 ,r0 0x296318fa : add r6,r6 (gdb) Full build log in: https://buildd.debian.org/status/fetch.php?pkg=3Dpython3.9&arch=3Dsh4&ver= =3D3.9.0-1&stamp=3D1601938112&raw=3D0 Let me know where to dig next.=