Reflection: try holding 32/64 address offset in target machine pointers. #22899
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiling for a 32 bit machine,
uintptr_t
fromReflectionInfo
willbe the integer sized to hold a 32 bit pointer, so a 64 bit pointer might
not fit.
This commit removes the solution in
0f20c48 and does a runtime check that
the calculated offset will fit into the target machine
uintptr_t
, whichmight not be true for 32 bits machines trying to read 64 bits images,
which should not be that common (and those images have to have offsets
bigger than what a 32 bits number can hold).
This broke the Android ARMv7 CI build: https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/1858/
/cc @compnerd hopefully this will not have a problem in
cl.exe
?