Page MenuHomeFreeBSD

tip: Fix pointer-vs-integer confusion
ClosedPublic

Authored by jrtc27 on Jun 8 2021, 3:07 PM.
Tags
None
Referenced Files
F129477054: D30697.id.diff
Sun, Sep 21, 4:56 AM
F129423449: D30697.id90589.diff
Sat, Sep 20, 4:53 PM
Unknown Object (File)
Aug 14 2025, 10:38 PM
Unknown Object (File)
Aug 5 2025, 6:37 AM
Unknown Object (File)
Jul 20 2025, 7:14 PM
Unknown Object (File)
Jul 20 2025, 6:25 PM
Unknown Object (File)
Jul 20 2025, 6:19 PM
Unknown Object (File)
Jul 20 2025, 6:08 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