<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">    Hi, all</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">    Yesterday I find that interceptor_via_fun doesn't work for aligned_alloc when I try to suppress a error from the check for aligned_malloc. And after I try to look into the implementation of AddressSanitizer, I find that it doesn't implement the suppression mechanism for *alloc functions. From the codes I see, only the str* functions could be suppressed by the <span  style="caret-color:#000000;color:#000000;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;background-color:#ffffff;text-decoration:none;float:none;display:inline;">interceptor_via_fun way. I want to ask why compiler-rt design in this way. If this is a porgram, I want to try to fix this.</span></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><span  style="caret-color:#000000;color:#000000;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;background-color:#ffffff;text-decoration:none;float:none;display:inline;"><br ></span></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><span  style="caret-color:#000000;color:#000000;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;background-color:#ffffff;text-decoration:none;float:none;display:inline;">    Thanks,</span></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><span  style="caret-color:#000000;color:#000000;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;background-color:#ffffff;text-decoration:none;float:none;display:inline;">    Chuanqi<br ></span></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><blockquote  style="margin-right:0;margin-top:0;margin-bottom:0;"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">------------------------------------------------------------------</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发件人:llvm-dev@lists.llvm.org <llvm-dev@lists.llvm.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发送时间:2020年7月22日(星期三) 15:59</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">收件人:llvm-dev@lists.llvm.org <llvm-dev@lists.llvm.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">主 题:[llvm-dev] How to suppress error reports from the external libraries in compiler-rt?</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  class=" __aliyun_node_has_color" style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Hi, every one.</span></div><div  style="clear:both;"><span  class=" __aliyun_node_has_color" style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;">When I change the compiler of a project from gcc to clang, I met a problem about `aligned_alloc`. `aligned_alloc` accepts two arguments, one for alignment and another for size. </div><div  style="clear:both;">The standard document says that the `size` must be integral multiple of `alignment`. But the gcc allows more relaxing restriction.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Now I met a external library which depend on this behavior, which would fail when the ASanityChecker checks it. And I can not modify the codes in that library to generate a new library.</div><div  style="clear:both;">So I want to suppres the asanity check for `aligned_alloc`. I know here is a document (<a  href="https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-reports-in-external-libraries" target="_blank">https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-reports-in-external-libraries</a>).</div><div  style="clear:both;">However, it doesn't work when I try to write:</div><div  style="clear:both;">```</div><div  style="clear:both;">interceptor_via_fun:aligned_alloc</div><div  style="clear:both;">```</div><div  style="clear:both;">I also tried to write the function name who call `aligned_alooc`.  But it doesn't work, too.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">I know I need to ask to something like compiler-rt dev mailing list. But I didn't find it. So I ask it here.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Thanks,</div><div  style="clear:both;">Chuanqi </div></blockquote><div ><br ></div></div>