Page MenuHomeFreeBSD

kboot: Avoid UB behavior
ClosedPublic

Authored by imp on Mar 9 2024, 10:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 12:05 PM
Unknown Object (File)
Thu, Sep 26, 2:47 AM
Unknown Object (File)
Sun, Sep 22, 2:39 PM
Unknown Object (File)
Wed, Sep 18, 7:45 PM
Unknown Object (File)
Wed, Sep 18, 12:40 AM
Unknown Object (File)
Tue, Sep 17, 5:04 AM
Unknown Object (File)
Mon, Sep 16, 8:48 PM
Unknown Object (File)
Mon, Sep 16, 8:48 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