-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sanitizers] Replaced getMaxPointerSizeInBits with getPointerSizeInBi…
…ts, which was causing failures for 32bit x86. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D111829
- Loading branch information
1 parent
1fb24fe
commit 62627c7
Showing
2 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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 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,24 @@ | ||
; REQUIRES: i386-pc-linux-gnu | ||
|
||
; RUN: opt passes="print-stack-safety" -disable-output -mtriple=i386-pc-linux-gnu %s 2>&1 | FileCheck %s --check-prefixes=CHECK | ||
|
||
; CHECK: @main | ||
; CHECK-NEXT: args uses: | ||
; CHECK-NEXT: argv[]: empty-set | ||
; CHECK-NEXT: allocas uses: | ||
; CHECK-NEXT: [4]: [0,4) | ||
; CHECK-NEXT: [32]: full-set | ||
; CHECK-NEXT: safe accesses: | ||
|
||
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" | ||
target triple = "i386-pc-linux-gnu" | ||
|
||
; Function Attrs: mustprogress norecurse sanitize_address uwtable | ||
define dso_local i32 @main(i32 %argc, i8** %argv) { | ||
entry: | ||
%0 = alloca i32, align 4 | ||
%1 = alloca i8, i64 32, align 32 | ||
%2 = ptrtoint i8* %1 to i32 | ||
store i32 %2, i32* %0, align 4 | ||
ret i32 0 | ||
} |