[tor-bugs] #29537 [Core Tor/Tor]: verify intptr_t round-trip through void *
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Feb 19 23:25:27 UTC 2019
#29537: verify intptr_t round-trip through void *
------------------------------+----------------------------------------
Reporter: catalyst | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: portability technical-debt
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+----------------------------------------
Round-trip of `intptr_t` through `void *` isn't explicitly guaranteed by
C99. There are implementation-defined behaviors for integer to `void *`,
and vice versa. Only a round-trip of `void *` through `intptr_t` is
guaranteed, not vice versa. We seem to depend on being able to store an
integer in a `void *` from time to time, e.g., to store integers in a
smartlist.
We should run some automated tests to make sure this works as we expect,
at least until we stop needing this behavior. (See also #23714.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29537>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list