From owner-freebsd-bugs@freebsd.org Tue Oct 25 18:38:24 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88AAAC21770 for ; Tue, 25 Oct 2016 18:38:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2BAD8A for ; Tue, 25 Oct 2016 18:38:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PIcODe048765 for ; Tue, 25 Oct 2016 18:38:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213778] stable/11 -r307797 on BPi-M3 (cortex-a7): truss gets segmentation fault for handling SIGSYS Date: Tue, 25 Oct 2016 18:38:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 18:38:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213778 Bug ID: 213778 Summary: stable/11 -r307797 on BPi-M3 (cortex-a7): truss gets segmentation fault for handling SIGSYS Product: Base System Version: 11.0-STABLE Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: markmi@dsl-only.net In trying to build lang/gcc6 xgcc's cc1 got some SIGSYS examples. In trying= to track things down I ran into truss getting a SIGSEGV when it tries to handle the situation. . . In truss's enter_syscall there is (from a live gdb on truss, after the segmentation fault): 380 t->cs.name =3D sysdecode_syscallname(t->proc->abi->abi, t->cs.number); 381 if (t->cs.name =3D=3D NULL) (gdb)=20 382 fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d --= \n", 383 t->proc->abi->type, t->cs.number); 384=20=20=20=20=20 385 sc =3D get_syscall(t->cs.name, narg); 386 t->cs.nargs =3D sc->nargs; 387 assert(sc->nargs <=3D nitems(t->cs.s_args)); 388=20=20=20=20=20 389 t->cs.sc =3D sc; (gdb) print *t $2 =3D {entries =3D {le_next =3D 0x0, le_prev =3D 0x20617070}, proc =3D 0x2= 0617060, tid =3D 100150, in_syscall =3D 1, cs =3D {sc =3D 0x0, name =3D 0x0, number =3D 5808= 28064, args =3D 0x2061b0c0, nargs =3D 0,=20 s_args =3D 0x2061b0ec}, before =3D {tv_sec =3D 1477418265, tv_nsec =3D = 492342263}, after =3D {tv_sec =3D 1477418265, tv_nsec =3D 492496630}} (gdb) print sc $3 =3D (struct syscall *) 0x0 So line 386 listed above gets a segmentation fault for sc->nargs when t->cs.name is a NULL pointer: sc ends up NULL. Looking at the two things that the fprintf on lines 382 and 383 would repor= t: (gdb) print t->proc->abi->type $4 =3D 0x10166 "FreeBSD ELF32" (gdb) print t->cs.number $5 =3D 580828064 (gdb) print narg $6 =3D 0 (that last is for context for the get_syscall arguments). FYI: 580828064 =3D 0x229EBBA0 Context: root@bananapi-m3:/usr/ports # uname -apKU FreeBSD bananapi-m3 11.0-STABLE FreeBSD 11.0-STABLE #0 r307797M: Mon Oct 24 00:41:16 PDT 2016=20=20=20=20 markmi@FreeBSDx64:/usr/local/src/crochet/work/obj/arm.armv6/usr/src/sys/ALL= WINNER arm armv6 1100505 1100505 --=20 You are receiving this mail because: You are the assignee for the bug.=