mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
RemoteMirror gets called on lots of malformed type information, due to memory corruption bugs or even clients that ask RemoteMirror to decode a chunk of memory to test whether or not it might be valid type data. In any case, we need to be a little cautious here. In this case, I've chosen to ignore any enum whose in-memory size (according to the metadata) is over 1 MiB. We can easily adjust this limit up if experience shows there really are legitimate enums this large in the wild.