Page MenuHomeFreeBSD

kboot: Avoid UB behavior
ClosedPublic

Authored by imp on Mar 9 2024, 10:50 PM.
Tags
None
Referenced Files
F167644001: D44285.id135619.diff
Sun, Aug 23, 11:16 AM
Unknown Object (File)
Wed, Aug 19, 4:44 PM
Unknown Object (File)
Wed, Aug 19, 3:50 PM
Unknown Object (File)
Wed, Aug 19, 11:11 AM
Unknown Object (File)
Tue, Aug 18, 8:29 PM
Unknown Object (File)
Tue, Aug 18, 8:25 PM
Unknown Object (File)
Tue, Aug 18, 4:01 PM
Unknown Object (File)
Mon, Aug 17, 8:37 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 56521
Build 53409: arc lint + arc unit