Skip to content

[MTE] add stack frame history buffer #86356

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

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Mar 22, 2024

this will allow us to find offending objects in a symbolization step,
like we can do with hwasan.

needs matching changes in AOSP:
https://android-review.git.corp.google.com/q/topic:%22stackhistorybuffer%22

fmayer added 4 commits March 22, 2024 16:08
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
fmayer added a commit to fmayer/llvm-project that referenced this pull request Apr 11, 2024
Created using spr 1.3.4
@fmayer fmayer changed the title WIP MTE stack record [MTE] add stack frame history buffer Apr 19, 2024
fmayer added 5 commits April 26, 2024 13:26
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
@fmayer fmayer requested a review from eugenis May 15, 2024 16:52
@fmayer fmayer marked this pull request as ready for review May 15, 2024 16:52
Copy link
Contributor

@eugenis eugenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests.

fmayer added 3 commits May 20, 2024 15:20
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
@fmayer fmayer requested a review from eugenis May 28, 2024 22:32
@fmayer fmayer merged commit 34edaaf into users/fmayer/spr/main.wip-mte-stack-record May 28, 2024
2 of 3 checks passed
@fmayer fmayer deleted the users/fmayer/spr/wip-mte-stack-record branch May 28, 2024 23:05
fmayer added a commit that referenced this pull request May 29, 2024
this will allow us to find offending objects in a symbolization step,
like we can do with hwasan.

needs matching changes in AOSP:
https://android-review.git.corp.google.com/q/topic:%22stackhistorybuffer%22

Pull Request: #86356
@fmayer
Copy link
Contributor Author

fmayer commented May 29, 2024

Now actually submitted: 1f67f34

@mikaelholmen
Copy link
Collaborator

Hello @fmayer !

If I compile this patch with UBSan (-DLLVM_USE_SANITIZER='Undefined') and run tests, I see the following for many many lit tests:

../include/llvm/Support/CommandLine.h:601:13: runtime error: load of value 2, which is not a valid value for type 'const RecordStackHistoryMode'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../include/llvm/Support/CommandLine.h:601:13 in 

Can e.g. be seen with

llc -verify-machineinstrs -o - test/CodeGen/AArch64/ldst-unscaledimm.ll -mtriple=aarch64-linux-gnu

if you compiled llc with UBSan.

@fmayer
Copy link
Contributor Author

fmayer commented May 30, 2024

Hello @fmayer !

If I compile this patch with UBSan (-DLLVM_USE_SANITIZER='Undefined') and run tests, I see the following for many many lit tests:

../include/llvm/Support/CommandLine.h:601:13: runtime error: load of value 2, which is not a valid value for type 'const RecordStackHistoryMode'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../include/llvm/Support/CommandLine.h:601:13 in 

Can e.g. be seen with

llc -verify-machineinstrs -o - test/CodeGen/AArch64/ldst-unscaledimm.ll -mtriple=aarch64-linux-gnu

if you compiled llc with UBSan.

should be fixed: 973821c

@mikaelholmen
Copy link
Collaborator

Hello @fmayer !
If I compile this patch with UBSan (-DLLVM_USE_SANITIZER='Undefined') and run tests, I see the following for many many lit tests:

../include/llvm/Support/CommandLine.h:601:13: runtime error: load of value 2, which is not a valid value for type 'const RecordStackHistoryMode'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../include/llvm/Support/CommandLine.h:601:13 in 

Can e.g. be seen with

llc -verify-machineinstrs -o - test/CodeGen/AArch64/ldst-unscaledimm.ll -mtriple=aarch64-linux-gnu

if you compiled llc with UBSan.

should be fixed: 973821c

Thanks!

fmayer added a commit to fmayer/llvm-project that referenced this pull request Sep 13, 2024
this will allow us to find offending objects in a symbolization step,
like we can do with hwasan.

needs matching changes in AOSP:
https://android-review.git.corp.google.com/q/topic:%22stackhistorybuffer%22

Pull Request: llvm#86356
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.

3 participants