Displaying 3 results from an estimated 3 matches for "sanitizerkind".
2015 Aug 11
2
NSW and ExtLdPromotion()
...I was wrong.
Here is the reduced testcase:
long long foo(int *a)
{
long long c;
c = *a * 1405;
return c;
}
Clang emitted the following IR (It is done by EmitMUL() in CGExprScalar.cpp,
while
CGF.getLangOpts().getSignedOverflowBehavior()=LangOptions::SOB_Undefined and
CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)=false):
; Function Attrs: nounwind readonly
define i64 @foo(i32* nocapture readonly %a) #0 {
entry:
%0 = load i32* %a, align 4, !tbaa !1
%mul = mul nsw i32 %0, 1405
%conv = sext i32 %mul to i64
ret i64 %conv
}
Question 1: Is it reasonable to say "...
2018 Mar 19
2
Suggestions for how coroutines and UBSan codegen can play nice with one another?
...best way for the LLVM coroutines transform passes to play
nicely with the code generated with UBSan's '-fsanitize=null'?
* Are there other LLVM passes I could look at, to see examples of how they
were modified to handle UBSan?
* I've seen code in Clang's codebase that adds 'SanitizerKind::Null' to a
set of skipped UBSan checks; should lib/CodeGen/CGCoroutine.cpp also do
something like this, to avoid generating UBSan checks altogether? Would
that be sufficient to avoid the error? Are there downsides to doing this?
Any and all advice is appreciated -- thanks!
- Brian Gesiak
---...
2018 Mar 19
0
Suggestions for how coroutines and UBSan codegen can play nice with one another?
...ght be the best person to answer this.
> * Are there other LLVM passes I could look at, to see examples of how they were modified to handle UBSan?
No, no other llvm passes needed to be modified to handle ubsan instrumentation.
> * I've seen code in Clang's codebase that adds 'SanitizerKind::Null' to a set of skipped UBSan checks; should lib/CodeGen/CGCoroutine.cpp also do something like this, to avoid generating UBSan checks altogether? Would that be sufficient to avoid the error?
I don't think it would be sufficient. You might encounter the same issue with -fsanitize=alignm...