HomeFreeBSD

tip: Fix pointer-vs-integer confusion

Description

tip: Fix pointer-vs-integer confusion

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.

Reviewed by: imp, kib
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D30697

Details

Provenance
jrtc27Authored on Jun 8 2021, 5:30 PM
Reviewer
imp
Differential Revision
D30697: tip: Fix pointer-vs-integer confusion
Parents
R10:de295884c4ef: tip: Cast via intptr_t not long when casting between pointer and int
Branches
Unknown
Tags
Unknown