You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Triage the 84 pointer/width truncation warnings in the iOS port and ParparVM runtime #5781
These are the census rows most likely to be real 64-bit defects rather than
tidiness, so they are worth separating from the unused-symbol cleanup:
instances
flag
group
74
-Wshorten-64-to-32
port
4
-Wshorten-64-to-32
runtime (nativeMethods.m)
6
-Wpointer-to-int-cast
runtime (nativeMethods.m, cn1_globals.m)
-Wpointer-to-int-cast here reads "cast to smaller integer type" -- a
pointer being narrowed, which silently corrupts any address above 4GB. The -Wshorten-64-to-32 rows are "implicit conversion loses integer precision".
Each site needs reading rather than a blanket cast: the right answer is
sometimes to widen the destination, sometimes to route through uintptr_t, and
sometimes the value genuinely is bounded and an explicit cast documents that.
An added cast that merely silences the diagnostic without establishing the bound
is worse than the warning, because it removes the evidence.
Related, already fixed and useful as a model: the IOSNative.m and cn1_globals.m pointer/integer conversions retired earlier in this work went
through (JAVA_LONG)(uintptr_t) rather than a direct cast.
Also in this family but smaller: -Wpointer-sign (7), -Wnonnull (4), -Wincompatible-pointer-types (6), -Wmismatched-parameter-types (1).
Found by the native warning census (scripts/check-native-warnings.py).
Activity