Page MenuHomeFreeBSD

tip: Fix pointer-vs-integer confusion
ClosedPublic

Authored by jrtc27 on Jun 8 2021, 3:07 PM.
Tags
None
Referenced Files
F150412704: D30697.diff
Wed, Apr 1, 12:32 AM
Unknown Object (File)
Mon, Mar 30, 5:52 PM
Unknown Object (File)
Thu, Mar 26, 7:08 AM
Unknown Object (File)
Wed, Mar 25, 5:40 AM
Unknown Object (File)
Wed, Mar 25, 1:26 AM
Unknown Object (File)
Sun, Mar 22, 4:37 AM
Unknown Object (File)
Tue, Mar 17, 8:39 AM
Unknown Object (File)
Feb 15 2026, 7:17 PM
Subscribers
None

Details

Summary

Currently IREMOTE assumes that every value is (initially) a pointer to a
long. This is true for NUMBERs, but false for STRINGs, which are instead
pointers to pointers, though on ILP32 and LP64 systems these happen to
have the same representation, but this is still a strict aliasing
violation, and of course breaks on systems where the representations are
not the same, such as CHERI. We do not currently have any BOOLs (short,
curiously) or CHARs used with IREMOTE, though the code should not be
relying on that.

This removes the unused setaddress macro, and the now-unused address
macro due to the above issue.

Obtained from: CheriBSD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable