[Midnightbsd-cvs] [MidnightBSD/src] fda694: [libm] Avoid left shift of signed integer entities
Ed Maste
noreply at github.com
Tue Dec 16 18:05:09 EST 2025
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/src
Commit: fda6942e63a2b03836369adca83c6fa0fcf248b0
https://github.com/MidnightBSD/src/commit/fda6942e63a2b03836369adca83c6fa0fcf248b0
Author: Steve Kargl <kargl at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M lib/msun/src/e_fmodf.c
M lib/msun/src/math_private.h
M lib/msun/src/s_ilogbf.c
M lib/msun/src/s_remquof.c
Log Message:
-----------
[libm] Avoid left shift of signed integer entities
Follow-up commit d180086e6eae by fixing the left shift of signed integer
entities through the use of a helper function. Specific per file changes
are:
* lib/msun/src/e_fmodf.c:
* lib/msun/src/s_remquof.c:
. Eliminate now unused variable 'i'.
. Sort declaration statement.
. Use subnormal_ilogbf() to avoid left shift of signed integer.
* lib/msun/src/math_private.h b/lib/msun/src/math_private.h:
. Implement subnormal_ilogbf() to extract an exponent of a subnormal
float. This avoids left shifts of signed integers.
. Update nearby comment.
* lib/msun/src/s_ilogbf.c
. Fix declaration of the function statement in accordance with style(9).
. Use subnormal_ilogbf() to avoid left shift of signed integer.
PR: 288850
MFC after: 1 week
(cherry picked from commit c58c77246f88da87f309e8c449e98195d43e2c76)
Commit: 901139dd7f654b93537fd4a269bb256a7cbce5a8
https://github.com/MidnightBSD/src/commit/901139dd7f654b93537fd4a269bb256a7cbce5a8
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/arm/arm/pmu_fdt.c
Log Message:
-----------
arm: Fix two typos in kernel messages of pmu_fdt.c
- s/interupt/interrupt/
(cherry picked from commit 9c7a9b3ff1eebbc15ef26bbdaae4f9448450523f)
Commit: 8f00634520842477c5c9db7021509930e08ba835
https://github.com/MidnightBSD/src/commit/8f00634520842477c5c9db7021509930e08ba835
Author: Dag-Erling Smørgrav <des at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M lib/libc/stdlib/qsort.c
Log Message:
-----------
libc: Drop incorrect qsort optimization
As pointed out in the PR and the article linked below, the switch to
insertion sort in the BSD qsort code is based on a misunderstanding of
Knuth's TAOCP and is actually a pessimization. As demonstrated by the
added test, it is trivially easy to construct pathological input which
results in quadratic runtime. Without that misguided optimization, the
same input runs in nearly linearithmic time.
https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3
PR: 287089
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51907
(cherry picked from commit 5205b32de3fb7702e96b3991f5b1a61eee406d8b)
Commit: 4b11af94c0d8e7b5736167a29baa09fd0b232778
https://github.com/MidnightBSD/src/commit/4b11af94c0d8e7b5736167a29baa09fd0b232778
Author: Dag-Erling Smørgrav <des at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/libkern/qsort.c
Log Message:
-----------
libkern: Drop incorrect qsort optimization
See 5205b32de3fb for details.
PR: 287089
MFC after: 1 week
Reviewed by: jlduran
Differential Revision: https://reviews.freebsd.org/D51919
(cherry picked from commit ef8f3e913156aa268e07ae1daa68e3bc3f1c4d29)
Commit: d90bae91528c838cb6e479aa7f7efb9791293690
https://github.com/MidnightBSD/src/commit/d90bae91528c838cb6e479aa7f7efb9791293690
Author: Dag-Erling Smørgrav <des at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sbin/mount/getmntopts.c
Log Message:
-----------
getmntpoint: Don't compare st_rdev for non-devices
If the mntfromname of a mountpoint is not a device (e.g. nullfs, tarfs,
procfs) we shouldn't compare st_rdev, as any match will be spurious.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51945
(cherry picked from commit 8073a5137f223bb481606b15edaa5ecb93ceffcb)
Commit: 625252aef9fe383192ebe27986ee8aec630979a4
https://github.com/MidnightBSD/src/commit/625252aef9fe383192ebe27986ee8aec630979a4
Author: Dag-Erling Smørgrav <des at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M lib/libc/sys/stat.2
Log Message:
-----------
stat(2): Document the st_rdev field
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D51946
(cherry picked from commit 4eaa7f66620c33957ff9a929820cb791f7fe5578)
Commit: dbf818ad236ac7cf68224265ae88b736c0e71eb2
https://github.com/MidnightBSD/src/commit/dbf818ad236ac7cf68224265ae88b736c0e71eb2
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/fs/msdosfs/bootsect.h
Log Message:
-----------
msdofs(5): Fix a typo in a source code comment
- s/fist/first/
(cherry picked from commit ac4005219166fc94da4ebb7adce3da159072f6d3)
Commit: 7cffd1c66a0412b0e630f4c9c74782071d45ccae
https://github.com/MidnightBSD/src/commit/7cffd1c66a0412b0e630f4c9c74782071d45ccae
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/dev/hpt27xx/hptintf.h
Log Message:
-----------
hpt27xx(4): Fix a couple of typos in source code comments
- s/tranform/transform/
(cherry picked from commit 49ae0c259205e45267ed5d8dcc99132595cf1cec)
Commit: 128e09fa2824f6a3bc3bc4309c227c1ba7333125
https://github.com/MidnightBSD/src/commit/128e09fa2824f6a3bc3bc4309c227c1ba7333125
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/ufs/ffs/ffs_rawread.c
Log Message:
-----------
ffs(3): Fix a typo in a source code comment
- s/fist/first/
(cherry picked from commit cc5623d8bda6ac24faf1c18ba9712e7f78dc127b)
Commit: e4f9953dbc8b5d39fb575f79d7ccbbbb6ca209ee
https://github.com/MidnightBSD/src/commit/e4f9953dbc8b5d39fb575f79d7ccbbbb6ca209ee
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/cam/ata/ata_all.c
M sys/cam/scsi/scsi_da.c
Log Message:
-----------
cam(3): Fix a common typo in source code comments
- s/tranferred/transferred/
(cherry picked from commit 90d7186379b08e5fb0f3d146a2e82a4fa8d9c9b8)
Commit: a0260cb6e294238041c58ec024b642f1e49a16ba
https://github.com/MidnightBSD/src/commit/a0260cb6e294238041c58ec024b642f1e49a16ba
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/dev/bce/if_bce.c
Log Message:
-----------
bce(4): Fix a typo in a source code comment
- s/firwmare/firmware/
(cherry picked from commit a848c85d27c8f8d6b8394a372417703a2969314c)
Commit: d2da24ea62554af0f6924ec7b6ddb6d0994c5567
https://github.com/MidnightBSD/src/commit/d2da24ea62554af0f6924ec7b6ddb6d0994c5567
Author: Gordon Bergling <gbe at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/dev/mwl/if_mwl.c
Log Message:
-----------
mwl(4): Fix a typo in a source code comment
- s/firwmare/firmware/
(cherry picked from commit 4f768b8acdf818f08f4f0124c1df418127720266)
Commit: ca1c2ec6d3fa74e25fa52b06df4841ccf5415248
https://github.com/MidnightBSD/src/commit/ca1c2ec6d3fa74e25fa52b06df4841ccf5415248
Author: Dimitry Andric <dim at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
Log Message:
-----------
Merge commit cf721e29c6a3 from llvm git (by Amy Kwan):
[PowerPC] Do not merge TLS constants within PPCMergeStringPool.cpp (#94059)
This patch prevents thread-local constants to be merged within
PPCMergeStringPool.cpp.
The PPCMergeStringPool pass primarily merges non-thread-local constants
together, and thread-local constants should not be mixed together with
other (non-thread-local) constants. In the event that thread-local and
other non-thread-local constants are pooled together, the
llvm.threadlocal.address intrinsic can fail as it expects its argument
to be a thread-local global value, but the merged string structure
created by the PPCMergeStringPool pass is not thread-local as a whole.
This fixes an error "llvm.threadlocal.address first argument must be a
GlobalValue" when building the math/nauty port on PowerPC architectures.
PR: 289122
Reported by: pkubaj
MFC after: 3 days
(cherry picked from commit cb2887746f8b9dd4ad6b1e757cdc053a08b25a2e)
Commit: f8aadbceec83a88f1028169e2b14543f374e1a7d
https://github.com/MidnightBSD/src/commit/f8aadbceec83a88f1028169e2b14543f374e1a7d
Author: Ed Maste <emaste at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/netgraph/ng_parse.c
Log Message:
-----------
ng_parse: disallow negative length for malloc
This is an interim robustness improvement; further improvements as
described in the PR and/or Phabricator review are still needed.
PR: 267334
Reported by: Robert Morris <rtm at lcs.mit.edu>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37229
(cherry picked from commit ae4f39464c61182c2bdfd3cc61594f8707b3daf0)
(cherry picked from commit 0e0329c6dbabc12f5ab08bb63929a2ba6d506084)
Commit: 063a82139506c7e7b39054ab51530925ecef017e
https://github.com/MidnightBSD/src/commit/063a82139506c7e7b39054ab51530925ecef017e
Author: Ed Maste <emaste at FreeBSD.org>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M sys/netgraph/ng_parse.c
Log Message:
-----------
ng_parse: Add upper bound to avoid possible overflow
Also move num initialization for clarity.
We still need to check num in ng_unparse_composite (reported by des@ in
D52151) but this is another incremental improvement in netgraph input
validation.
Reviewed by: des
PR: 267334
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52151
(cherry picked from commit 375527545c85362f14070d35575f9bcd7092f4b9)
(cherry picked from commit 4407e10fdc8b969775233d47c05559c2601b60f4)
Compare: https://github.com/MidnightBSD/src/compare/e1fd91d39fae...063a82139506
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list