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.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.