From nobody Sat Nov 25 04:52:27 2023 X-Original-To: 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 4Scfbc5YTvz522t1 for ; Sat, 25 Nov 2023 04:52:28 +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 4Scfbc496fz4PKv for ; Sat, 25 Nov 2023 04:52:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700887948; 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: in-reply-to:in-reply-to:references:references; bh=ivTWs+d2I/b+yicGb5g47ZP4c3C6AQ9voLc57YU7pXo=; b=GyFiH6XcBfmBbNkpD0SbnIPx6NzYH/w5xvE4ndFohbWwgLqfdFNzURLLSWTVK7Rr4geZh/ V1TonRxXhKVX/AXVeKlV49AQAMfOOoFy/x/YwZvxnJZbGcNreRVxcuqf9sYy9fyzJYm8EH nJ+zj+3lH1ZsLr3TS9O9Hh1xxz2ErZqUeDKhmAfcmBe3qGJ5ZHOb8gZuCPfFMbVVhsoRKf Zz6U1dTe75sHk5TwKw9u99KqH393TYfRvCXQXJwchmi9XOxpmvQN5749ty0PdtdwMk4zyE OlwgQJpiTbY6AUTCqgZUiRF8FiIP9Nz77LOmRD/3JeWpQ81rTdi2pFbvT2AFRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700887948; a=rsa-sha256; cv=none; b=CTNukBq7s5eglqx/aVwjpO2BmQv4/S1ivpMxbx07+Yx7HjVIhNrMp/yKLPmHonalpFS55+ av1Yt6eug4QnhV7dd6aYjL1kXwvMM70V3xZrZ1WVljec98Lv3XzbpnJP2rB4OMe69Bbx9u 6hBB5UaDACF7mzWY4cMsqstFzUaY53I7zQoG6J69mN+vzvy7ItOCZpUBr3HuPBS7PJYJnR 7nLD4AeKGzMXSZeLOhCfvQtnTjGyyspe6e5ww1WjaC45oB3lRXlDCHB7Rcl4fGNbWskc/q YhWSPJRJHffGpKZRfCCZ+xtx0GglKfQWoo5prstp3rUY+oKMVM2gNl5f95lEBg== 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 4Scfbc36vDz1DvY for ; Sat, 25 Nov 2023 04:52:28 +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 3AP4qSu1012671 for ; Sat, 25 Nov 2023 04:52:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3AP4qSK5012670 for bugs@FreeBSD.org; Sat, 25 Nov 2023 04:52:28 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: bugs@FreeBSD.org Subject: [Bug 275322] Improper handling of mxcsr register during debug (gdb/lldb) Date: Sat, 25 Nov 2023 04:52:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cheyenne.wills@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275322 --- Comment #2 from Cheyenne Wills --- (In reply to Kyle Evans from comment #1) I might be able to reduce the C code even more if needed. Some background on how I stumbled on this. I'm trying to debug some of my code (assembly) that uses SSE2 floating point instructions. The code runs fine under Linux, and I wanted to see if it co= uld be ported to freebsd. The code ended up in a loop where it is trying to sc= ale a floating point number, and when I was trying to debug the code I was gett= ing inconsistent results when I was running the program under the gdb debugger. The assembly source does set mxcsr to control how underflow/overflow, etc, = are handled within the assembly code. The mxcsr settings are relied upon within the assembly code and the mxcsr register is reset back to value that it was when the assembly code got control from the calling C code. The mxcsr regi= ster is set back to the "original" value whenever the assembly code switches bac= k to any C functions, or other system calls. --=20 You are receiving this mail because: You are the assignee for the bug.=