swift
36e0fd36 - ReflectionContext: Keep read range properly-aligned.

Commit
6 years ago
ReflectionContext: Keep read range properly-aligned. If a Mach-O image got emitted in just the wrong way, the range of `__TEXT,__swift*` sections to read could end up starting at an unaligned address (because things like type refs have only one byte alignment), and this would cause the reflection context to read an unaligned chunk of the remote memory, causing alignment errors when addresses are mapped to the local copy. Keep the ranges at least 8-byte-aligned to stave off the alignment issues we might run into with any metadata structures, which are generally at most pointer aligned. Fixes rdar://problem/54556791
Author
Committer
Parents
Loading