From nobody Mon May 05 08:02:29 2025 X-Original-To: ports-bugs@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 4ZrYsd54Lcz5v6Mn for ; Mon, 05 May 2025 08:02:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrYsd4Z89z3gXG for ; Mon, 05 May 2025 08:02:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746432149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hSsUNKCZFU3PfuCIXyMWDG5DRjNArfnfZON7QMBIDe0=; b=FoAfc3v8/6cNE3jdTYB4uvZqtCxbYlD0AD1cpw6A3R0Z6HXdHyPr6zGPkkCrEoOberCaSA Ru91La9otmz6X9YqZ9fqs2MRXftJcJ5jeFNricqGH8PULy4qEozZezWK4b0tiCOAXBRgUI 8JjVLBw/S6EYLfgIySkk2dM0KyP+9hjaAgaiLRfHjcBz/YsQ6Triu8RCNDkXIKUkhadSxz r98xVrcAAf5V0CXHwo9K1ketgbn+Wv6JaGQVwQw0f8YeuFU0WDnaNRzTMi9aNcjpdTXKuD KunQ7LSEmK+W+Ec/uorddbTx1ZYhuYRyPRW01Xn6uc/LwLxpL7oA+B3Qo/7psg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746432149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hSsUNKCZFU3PfuCIXyMWDG5DRjNArfnfZON7QMBIDe0=; b=cMvcNlTBxgmBrVPUdZPJZ9IRT+eWhxE3CkKnCjvUtUv1XXjlS2J8SileVSacQfBBEVaqF5 0+i3fG3Y9kdqiusnNUKMp5c3WR0ahRVX0U3adQuO0K35Mf3Odd1w9G0Tm4NiuJZ7E2lY9K yHeqzDJWWLkV+bkgZShFOTR77VH5hndZPM5G/Y6Ddbd5DmAJ9BVyZWZjE6Kfg7saGJ3wyJ b1uoVNDPKK/PKT8D0G2cY9HedJgHZ/Lkvk4qJNCKUw4ctyf1NtSWRbYlu1ABu7ew+byWCB YY4ciixjLto8ZlJ7nEXqOmCsnJdOqhwoADAsU8qFYP8Z1qA1j+Hmkv7U0KAjLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746432149; a=rsa-sha256; cv=none; b=lJOsXwRqM6n2ke1TjQHk0lbP49Nuo8JqXq/r4hkPX9Jme8GyUgpnbcNaotMCr9okDnv7C2 aJxqD68+2FeQT7A4KCTb+loOAX/hr2IRI2LPZRnQVepeSmy2Q0puFymmscKwi1bqgR2Bgn kWdIc6EtZZpSJpnC7veq3GlInRA89CG7Dk+lYh1jgUDf+ZyHYUu/XOcHixbkw9M6FI62GD 1iqycoNyiqxpBDDOylHwugbS3T2HDwglEGRJu7CtnV9o1src6DK5Q9xEZ5BXzYavBcBiRp 33410XOubW7M7QOWLkRYMm+Bvyvqsul36+CuyRD5ULhyLazT6rNJoBwQTrLXuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZrYsd3xtPz14h4 for ; Mon, 05 May 2025 08:02:29 +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 54582TdW081612 for ; Mon, 5 May 2025 08:02:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 54582T3F081611 for ports-bugs@FreeBSD.org; Mon, 5 May 2025 08:02:29 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: ports-bugs@FreeBSD.org Subject: [Bug 286593] devel/llvm15: wrong stack guard check on armv7 Date: Mon, 05 May 2025 08:02:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fuz@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: brooks@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286593 Bug ID: 286593 Summary: devel/llvm15: wrong stack guard check on armv7 Product: Ports & Packages Version: Latest Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: brooks@FreeBSD.org Reporter: fuz@FreeBSD.org CC: Andrew@FreeBSD.org Assignee: brooks@FreeBSD.org Flags: maintainer-feedback?(brooks@FreeBSD.org) Debugging a crash caused during the compilation of emulators/uae on armv7 FreeBSD 14.2, it appears that devel/llvm15 generates wrong code for stack checks. The cc we ship with base generates this sort of code in main: 00000000
: 0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, r10, r11, lr} 4: e28db01c add r11, sp, #28 8: e24dd004 sub sp, sp, #4 c: ed2d8b04 vpush {d8, d9} 10: e24dde19 sub sp, sp, #400 14: e3000000 movw r0, #0x0 00000014: R_ARM_MOVW_ABS_NC __stack_chk_guard 18: e3400000 movt r0, #0x0 00000018: R_ARM_MOVT_ABS __stack_chk_guard 1c: e5900000 ldr r0, [r0] 20: e50b0038 str r0, [r11, #-0x38] i.e. the stack check guard token is loaded from __stack_chk_guard and then saved on the stack. When compiling the same file with devel/llvm15, I get = this however: 00000000
: 0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, r10, r11, lr} 4: e28db01c add r11, sp, #28 8: e24dd004 sub sp, sp, #4 c: ed2d8b04 vpush {d8, d9} 10: e24ddf72 sub sp, sp, #456 14: e3000000 movw r0, #0x0 00000014: R_ARM_MOVW_ABS_NC __stack_chk_guard 18: e3400000 movt r0, #0x0 00000018: R_ARM_MOVT_ABS __stack_chk_guard 1c: e5900000 ldr r0, [r0] 20: e5900000 ldr r0, [r0] 24: e50b0038 str r0, [r11, #-0x38] This code differs in that there is an extra dereference of __stack_chk_guar= d.=20 As __stack_chk_guard holds a random number, this dereference is unlikely to= go right, crashing the program. Please investigate. --=20 You are receiving this mail because: You are the assignee for the bug.=