Skip to content

Set clang module directory correctly with fmodule-file-home-is-cwd #68865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

rmaz
Copy link
Contributor

@rmaz rmaz commented Sep 29, 2023

When building and importing modules built with -fmodule-file-home-is-cwd we should be setting the debug info directory to the current working directory. This matches the behavior in clang: https://reviews.llvm.org/D134911

When building and importing modules built with
`-fmodule-file-home-is-cwd` we should be setting the debug info
directory to the current working directory. This matches the
behavior in clang: https://reviews.llvm.org/D134911
@drodriguez
Copy link
Contributor

@swift-ci please test

@adrian-prantl adrian-prantl merged commit df48b60 into swiftlang:main Oct 3, 2023
@aschwaighofer
Copy link
Contributor

This causes a use-after-free failure on the ASAN bot:

https://ci.swift.org/job/oss-swift-incremental-ASAN-RA-macos/4251/consoleText

@aschwaighofer
Copy link
Contributor

In the DebugInfo/module-file-home-is-cwd.swift test

@rmaz
Copy link
Contributor Author

rmaz commented Oct 4, 2023

Ah, didn't realize ASTSourceDescriptor was moving its params in the constructor. I'll put up a change to copy the fields instead.

Oh this is actually a use-after-scope issue, will redo without reassigning the Desc function param.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants