Page MenuHomeFreeBSD

kboot: Avoid UB behavior
ClosedPublic

Authored by imp on Mar 9 2024, 10:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 12:16 PM
Unknown Object (File)
Mon, Jun 24, 5:23 PM
Unknown Object (File)
Mon, Jun 24, 7:12 AM
Unknown Object (File)
May 23 2024, 7:01 AM
Unknown Object (File)
May 23 2024, 7:00 AM
Unknown Object (File)
May 23 2024, 7:00 AM
Unknown Object (File)
May 20 2024, 4:42 PM
Unknown Object (File)
May 20 2024, 4:42 PM
Subscribers

Details

Summary

offset is signed. Copy it to the unsigned res before shifting. This
avoids any possible undefined behavior for right shifting signed
numbers. No functional change intended (and the code generated is the
nearly same for aarch64).

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable