Crashes during `withCurrentBacktraceImpl` on Linux?

Hi! While trying to debug some problems that were only occurring in CI, I tried adding debug spew to the affected tests by having them repeatedly call swift_reportError to display a backtrace at certain events. This appears to eventually cause malloc corruption or segfaults after a number of messages, as in this CI run:

https://ci.swift.org/job/swift-PR-Linux/28107/testReport/junit/Swift(linux-x86_64)/Concurrency_Runtime/async_task_locals_spawn_let_swift/

Looking at the source, I see that on ELF-based platforms we implement withCurrentBacktraceImpl using _Unwind_Backtrace instead of libbacktrace. I'm not familiar with this API; is it being used correctly?

Terms of Service

Privacy Policy

Cookie Policy