-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[ASan] Ensure Symbolize Flag setting on Windows through __asan_default_options() is maintained throughout runtime #132811
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
+52
−0
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
622216f
Implemented Update to Symbolizer Tools list after user defined function
macgyvercodilla e41767c
Merge branch 'main' of https://github.com/39otsu/llvm-project into de…
macgyvercodilla 6f78fb5
Merge branch 'main' into dev/mcodilla/symbolizer-tools
39otsu 43167b6
Update asan_flags.cpp
vitalybuka e6c76c3
Update sanitizer_symbolizer.h
vitalybuka 7b7e931
Update sanitizer_symbolizer_libcdep.cpp
vitalybuka 5012d3c
Merge branch 'main' into dev/mcodilla/symbolizer-tools
vitalybuka 0a290a2
Update sanitizer_symbolizer_libcdep.cpp
vitalybuka 0e9650c
Update symbolize.cpp
vitalybuka 2524121
Update sanitizer_symbolizer.h
vitalybuka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// RUN: %clangxx_asan -O0 %s -o %t | ||
// RUN: %env_asan_opts=symbolize=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-OFF | ||
// RUN: %env_asan_opts=symbolize=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-ON | ||
|
||
// RUN: %clangxx_asan -O0 %s -o %t -DUSER_FUNCTION_OFF | ||
// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-OFF | ||
// RUN: %env_asan_opts=symbolize=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-OFF | ||
// RUN: %env_asan_opts=symbolize=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-ON | ||
|
||
// RUN: %clangxx_asan -O0 %s -o %t -DUSER_FUNCTION_ON | ||
// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-ON | ||
// RUN: %env_asan_opts=symbolize=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-OFF | ||
// RUN: %env_asan_opts=symbolize=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SYMBOLIZE-ON | ||
#if USER_FUNCTION_OFF | ||
|
||
extern "C" __declspec(dllexport) extern const char *__asan_default_options() { | ||
return "symbolize=0"; | ||
} | ||
|
||
#endif | ||
|
||
#if USER_FUNCTION_ON | ||
|
||
extern "C" __declspec(dllexport) extern const char *__asan_default_options() { | ||
return "symbolize=1"; | ||
} | ||
|
||
#endif | ||
|
||
#include <cstdio> | ||
#include <cstdlib> | ||
|
||
volatile static int heapBufferOverflowValue = 10; | ||
int main() { | ||
int *array = new int[10]; | ||
heapBufferOverflowValue = array[10]; // CHECK-SYMBOLIZE-ON: symbolize.cpp:36 | ||
return 0; // CHECK-SYMBOLIZE-OFF: symbolize.cpp.tmp+0x | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.