Skip to content

Add new libcxx flag for disabling container overflow checks for Asan. #437

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
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/SWBUniversalPlatform/Specs/Clang LLVM 1.0.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -2736,6 +2736,7 @@
YES = ();
NO = (
"-D_LIBCPP_HAS_NO_ASAN",
"-D_LIBCPP_HAS_ASAN=0",
);
};
Condition = "$(CLANG_ADDRESS_SANITIZER)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4135,7 +4135,7 @@ fileprivate struct TaskConstructionTests: CoreBasedTests {
// There should be one CompileC task, which includes the ASan option, and which puts its output in a -asan directory.
results.checkTask(.matchTarget(target), .matchRuleType("CompileC")) { task in
task.checkRuleInfo([.equal("CompileC"), .equal("\(SRCROOT)/build/aProject.build/Debug/\(targetName).build/Objects-normal-asan/x86_64/SourceFile.o"), .suffix("SourceFile.m"), .any, .any, .any, .any])
task.checkCommandLineContains(["\(core.developerPath.path.str)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang", "-fsanitize=address", "-D_LIBCPP_HAS_NO_ASAN", "\(SRCROOT)/build/aProject.build/Debug/\(targetName).build/Objects-normal-asan/x86_64/SourceFile.o"])
task.checkCommandLineContains(["\(core.developerPath.path.str)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang", "-fsanitize=address", "-D_LIBCPP_HAS_NO_ASAN", "-D_LIBCPP_HAS_ASAN=0", "\(SRCROOT)/build/aProject.build/Debug/\(targetName).build/Objects-normal-asan/x86_64/SourceFile.o"])
}

// There should be one CompileSwiftSources task, which includes the ASan option, and which puts its output in a -asan directory.
Expand Down