<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 2:21 AM, Nuno Lopes <span dir="ltr"><<a href="mailto:nunoplopes@sapo.pt" target="_blank">nunoplopes@sapo.pt</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can use CallInst::hasFnAttr().  It checks for attributes in the instruction and in the function decl.<br></blockquote>
<div><br></div><div>Indeed.... </div><div>And we have </div><div>    bool doesNotReturn() const { return hasFnAttr(Attributes::NoReturn); }</div><div>and asan code called CI->doesNotReturn  and it did not work, but now it works. </div>
<div>Hmm. </div><div>Anyway, thanks! </div><div><br></div><div>--kcc </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="http://llvm.org/docs/doxygen/html/Instructions_8cpp_source.html#l00345" target="_blank">http://llvm.org/docs/doxygen/<u></u>html/Instructions_8cpp_source.<u></u>html#l00345</a><span class="HOEnZb"><font color="#888888"><br>

<br>
Nuno</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Building the following C code I get a call instruction that has no noreturn<br>
attribute, while the function itself does have it.<br>
<br>
void foo(void **b) {<br>
 __builtin_longjmp(b, 1);<br>
}<br>
<br>
<br>
define void @_Z3fooPPv(i8** %b) noreturn nounwind uwtable {<br>
entry:<br>
 %0 = bitcast i8** %b to i8*<br>
 tail call void @llvm.eh.sjlj.longjmp(i8* %0)<br>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<u></u><<<<<<<br>
 unreachable<br>
}<br>
<br>
declare void @llvm.eh.sjlj.longjmp(i8*) noreturn nounwind <<<<<<<<<<<<<<<<<<br>
<br>
<br>
I've hit this in asan where it checks the noreturn attribute in the call<br>
instruction, but not in the function object.<br>
Who is wrong here? Should asan also check noreturn in the called function?<br>
<br>
Thanks,<br>
<br>
--kcc <br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>