Page MenuHomeFreeBSD

Don't assume objects in program sections have a size of a pointer.
ClosedPublic

Authored by jhb on Sep 1 2020, 4:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 6:57 AM
Unknown Object (File)
Feb 22 2024, 11:39 PM
Unknown Object (File)
Dec 22 2023, 10:45 PM
Unknown Object (File)
Dec 12 2023, 6:25 AM
Unknown Object (File)
Sep 23 2023, 5:30 PM
Unknown Object (File)
Jul 9 2023, 8:23 PM
Unknown Object (File)
Jan 15 2023, 4:55 AM
Unknown Object (File)
Dec 24 2022, 11:05 PM
Subscribers

Details

Summary

The size of the object at 'addr' is unknown and might be smaller than
the size of a pointer (e.g. some x86 instructions are smaller than a
pointer). Instead, just check that the address is in the bounds of
the program header.

Test Plan
  • some TLS tests failed under CHERI because function pointers can't (easily) be added to under CHERI that now pass, but examining the failure led to the notion that the sizeof() was arbitrary and not always correct.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable