Files
swift-mirror/stdlib/public/runtime/Demangle.cpp
Joe Groff 439d5d6e41 Runtime: swift_getExistentialTypeMetadata should trust the compiler's ordering of protocols in compositions.
The compiler pre-canonicalizes protocol composition types by minimizing constraints and sorting the remaining protocols by module + name, which ought to be globally stable within a program (assuming there aren't multiple modules with the same name, in which case we'll have bigger problems…). The compiler also statically lays out existential types according to its conception of the canonical composition ordering, so the runtime's own attempts to form a stable ordering lead to layout inconsistencies between runtime and compile-time layout, leading to crashes like SR-4477.
2017-05-09 13:32:02 -07:00

12 KiB