[swift-dev] [Call for testing] Catching debug info violations at -Onone
Davide Italiano
ditaliano at apple.com
Wed Jan 17 18:43:51 CST 2018
Hi,
I would like to discuss the path towards enabling a new debug info verifier pass by default.
This should improve the debug experience of users at `-Onone`.
## Problem Description
Mandatory passes which run at `-Onone` can attach a wrong scope when they create instructions.
This may result in wrong debug informations generated and degraded debugger experience.
Examples of bugs of this kind recently fixed:
https://github.com/apple/swift/pull/13919 <https://github.com/apple/swift/pull/13919>
https://github.com/apple/swift/pull/13890 <https://github.com/apple/swift/pull/13890>
https://github.com/apple/swift/pull/13856 <https://github.com/apple/swift/pull/13856>
https://github.com/apple/swift/pull/13854 <https://github.com/apple/swift/pull/13854>
## Proposed solution
There’s currently nothing preventing compiler writers to attach the wrong scope, so, I’m going to check in a verifier pass to find holes in SIL debug scopes at -Onone.
Reference: https://github.com/apple/swift/pull/13491 <https://github.com/apple/swift/pull/13491> , which contains the code and a description of the heuristic used.
## Plan to enable this by default
I fixed all the bugs that have been found on the testsuite, but this seems to find still issues on larger projects (most notably, swiftpm), so for now this is disabled (but can be enabled using a flag [-Xllvm -verify-di-holes]). I’m working to
I would really appreciate if the community can test their swift projects with this flag enabled and report bugs.
I would also appreciate general feedback on the path forward.
Thanks,
—
Davide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20180117/29740e3b/attachment.html>
More information about the swift-dev
mailing list