Files
swift-mirror/test/Demangle/recursion-limit.swift
Alastair Houghton 8f717d2c50 [Demangler] Prevent stack overflow by limiting recursion depth.
It's trivially easy to drive the remanglers, the type decoder and the node
printer into a situation where they will overflow the process's stack.  For the
compiler, this is fine (though not great), but for the runtime it's a no-no.

This changeset imposes recursion depth limits to prevent uncontrolled stack
overruns.

rdar://68449341
2021-07-01 11:11:59 +01:00

11 lines
443 B
Swift

; This is not really a Swift source file: -*- Text -*-
RUN: swift-demangle < %S/Inputs/bigtype.txt 2>&1 > %t.check
RUN: diff -u %S/Inputs/bigtype-demangle.txt %t.check
RUN: swift-demangle -remangle-new < %S/Inputs/bigtype.txt > %t.check 2>&1 || true
RUN: diff -u %S/Inputs/bigtype-remangle.txt %t.check
RUN: swift-demangle -remangle-objc-rt < %S/Inputs/bigtype.txt > %t.check 2>&1 || true
RUN: diff -u %S/Inputs/bigtype-objcrt.txt %t.check