From nobody Wed Aug 11 00:26:26 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BC796174E9A9 for ; Wed, 11 Aug 2021 00:26:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GkrGV4bK5z3JW3 for ; Wed, 11 Aug 2021 00:26:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8621B2525C for ; Wed, 11 Aug 2021 00:26:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 17B0QQdh085083 for ; Wed, 11 Aug 2021 00:26:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 17B0QQle085082 for freebsd-arm@FreeBSD.org; Wed, 11 Aug 2021 00:26:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 257750] lldb p command crashes on Raspberry Pi 4 Date: Wed, 11 Aug 2021 00:26:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bc979@lafn.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@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 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257750 Bug ID: 257750 Summary: lldb p command crashes on Raspberry Pi 4 Product: Base System Version: 13.0-RELEASE Hardware: arm64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: bc979@lafn.org The following code - compile with cc -g #include #include #include #include int main (int argc, char *argv[]) { int i, randx, k, p; int initial; initial =3D atoi (argv[1]); randx =3D initial; k =3D atoi (argv[2]); p =3D atoi (argv[3]); i =3D 1; randx =3D (k * randx) % p; while (randx !=3D initial) { if (i < 5) printf ("count =3D %d randx =3D %d\n", i, randx); randx =3D (k * randx) % p; i++; } printf ("count =3D %d\n", i); } when run with lldb on Raspberry Pi 4 gives: test% lldb rand (lldb) target create "rand" Current executable set to '/home/doug/rand/rand' (aarch64). (lldb) b main Breakpoint 1: where =3D rand`main + 24 at rand.c:11:18, address =3D 0x000000000021089c (lldb) r 2357 109 100000 Process 1673 launching Process 1673 launched: '/home/doug/rand/rand' (aarch64) Process 1673 stopped * thread #1, name =3D 'rand', stop reason =3D breakpoint 1.1 frame #0: 0x000000000021089c rand`main(argc=3D4, argv=3D0x0000ffffffffe= a68) at rand.c:11:18 8 int i, randx, k, p; 9 int initial; 10=20=20=20 -> 11 initial =3D atoi (argv[1]); 12 randx =3D initial; 13 k =3D atoi (argv[2]); 14 p =3D atoi (argv[3]); (lldb) n Process 1673 stopped * thread #1, name =3D 'rand', stop reason =3D step over frame #0: 0x00000000002108ac rand`main(argc=3D4, argv=3D0x0000ffffffffe= a68) at rand.c:12:10 9 int initial; 10=20=20=20 11 initial =3D atoi (argv[1]); -> 12 randx =3D initial; 13 k =3D atoi (argv[2]); 14 p =3D atoi (argv[3]); 15=20=20=20 (lldb) p initial PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include = the crash backtrace. Stack dump: 0. Program arguments: lldb rand=20 1. HandleCommand(command =3D "p initial") #0 0x00000000034d9a4c PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13 #1 0x00000000034d7fb0 __cxx_atomic_store /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/c++/v1/atomic:985:5 #2 0x00000000034d7fb0 store /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/c++/v1/atomic:1594:10 #3 0x00000000034d7fb0 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:70:16 #4 0x00000000034da070 SignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3 #5 0x000000004457e994 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3 Segmentation fault (core dumped) test%=20 When run on amd64 yields: master% lldb rand (lldb) target create "rand" Current executable set to '/home/doug/rand/rand' (x86_64). (lldb) b main Breakpoint 1: where =3D rand`main + 22 at rand.c:11:25, address =3D 0x0000000000201906 (lldb) r 2357 109 100000 Process 60280 launching Process 60280 launched: '/home/doug/rand/rand' (x86_64) Process 60280 stopped * thread #1, name =3D 'rand', stop reason =3D breakpoint 1.1 frame #0: 0x0000000000201906 rand`main(argc=3D4, argv=3D0x00007fffffffe= a68) at rand.c:11:25 8 int i, randx, k, p; 9 int initial; 10=20=20=20 -> 11 initial =3D atoi (argv[1]); 12 randx =3D initial; 13 k =3D atoi (argv[2]); 14 p =3D atoi (argv[3]); (lldb) n Process 60280 stopped * thread #1, name =3D 'rand', stop reason =3D step over frame #0: 0x0000000000201916 rand`main(argc=3D4, argv=3D0x00007fffffffe= a68) at rand.c:12:17 9 int initial; 10=20=20=20 11 initial =3D atoi (argv[1]); -> 12 randx =3D initial; 13 k =3D atoi (argv[2]); 14 p =3D atoi (argv[3]); 15=20=20=20 (lldb) p initial (int) $0 =3D 2357 (lldb)=20 This appears to be the same as 248745 which is marked as Closed FIXED. fr v works fine on both architectures. --=20 You are receiving this mail because: You are the assignee for the bug.=