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
F151386966: D26279.id.diff
Wed, Apr 8, 1:58 AM
Unknown Object (File)
Mon, Apr 6, 6:35 AM
Unknown Object (File)
Thu, Mar 26, 11:16 AM
Unknown Object (File)
Wed, Mar 25, 11:10 AM
Unknown Object (File)
Wed, Mar 25, 7:04 AM
Unknown Object (File)
Thu, Mar 19, 7:47 AM
Unknown Object (File)
Thu, Mar 19, 7:29 AM
Unknown Object (File)
Fri, Mar 13, 11:06 AM
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