From nobody Fri Mar 03 00:24:10 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 4PSTHG5mVyz3wRd0 for ; Fri, 3 Mar 2023 00:24:10 +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 4PSTHG4kTgz4P7K for ; Fri, 3 Mar 2023 00:24:10 +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=1677803050; 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=FD6JmyoFA/3uG5y5eBusA5aeuwy3AuWQkz6gbmm4T6M=; b=F82RGe3HLXT0UfFbKFMFg0z2Hevegj8G9VbbfjL/Vufm0W5hBrRG8wZDL1Vl2s8E6qqc65 4z5N51GH0PuPogwtFKF9V5+nKZh1nWn8nVLSECLCUa7g3wUbDOqePjrd1GcnwwI+WovmnB sxEOqkaqZ29UXu2UPRmZUsVvapggBdiLUv3OtdNW0t4hu/5pwQKCFTj0+wlQXt3XkSxSs7 Ui6BVSxiVkc3vttLIMAAT1Uz7NXBpju+L/uA3fj1N8f//xCrQbGrKUzSEiCnvp6x9KtiV8 b4Xqs6dvrzhKmvAtEevOAm6Ldl9/1Mh9L8oY0/NAGz/kXc65GNLAvgR9Z6dsUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677803050; a=rsa-sha256; cv=none; b=muu0dwYJ5NRGY9iXLlJLMDRLI3WnVo1fSSnTmxcVWKX8EphIJJvB0l2SrKnj71fMgDdgrk 6qSbglVBJBFJCxLNf2RLpuy01YJBTzrr9zihPje53s0fWwAaE2POFnNX26/hRr1KhYnjeA VTybo25Nl97dmePVVUYgwI+Nzg2h14eXn0fgXLknbSBzlu9GluG61BXeyk6C6OdGuMIBwq bK4v4OsX913HKiJb0RPoKdOQpZXkreL0sB+yO2/vqQEX9CKW3fQBgqSRjLIaPwBJHdpTtT N1BuGCoeCKCGqTxRVigSOJiiQHNMctH5qJDRF27lOi+fchaaAsosSx8W9D9c8A== 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 4PSTHG3plnzcJQ for ; Fri, 3 Mar 2023 00:24:10 +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 3230OAPq029248 for ; Fri, 3 Mar 2023 00:24:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3230OADX029247 for bugs@FreeBSD.org; Fri, 3 Mar 2023 00:24:10 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269688] memalign() produces division by zero if alignment is 0 Date: Fri, 03 Mar 2023 00:24:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269688 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D1b1d2aea020e88b3d2076207b13fec3ad= de42aa9 commit 1b1d2aea020e88b3d2076207b13fec3adde42aa9 Author: Paul Floyd AuthorDate: 2023-02-24 16:29:01 +0000 Commit: Ed Maste CommitDate: 2023-03-03 00:23:24 +0000 libc: handle zero alignment in memalign() For compatibility with glibc. The previous code would trigger a division by zero in roundup() and terminate. Instead, just pass through to malloc() for align =3D=3D 0. PR: 269688 Reviewed by: imp, mjg MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/655 (cherry picked from commit 2c709ee70ade9fd8f77b37917a4169d667dda41d) lib/libc/gen/memalign.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=