(original) (raw)
Hi, all
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 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.
Thanks,
Chuanqi
------------------------------------------------------------------发件人:llvm-dev@lists.llvm.org发送时间:2020年7月22日(星期三) 15:59收件人:llvm-dev@lists.llvm.org主 题:\[llvm-dev\] How to suppress error reports from the external libraries in compiler-rt?Hi, every one.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.The standard document says that the \`size\` must be integral multiple of \`alignment\`. But the gcc allows more relaxing restriction.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.So I want to suppres the asanity check for \`aligned\_alloc\`. I know here is a document (https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-reports-in-external-libraries).However, it doesn't work when I try to write:\`\`\`interceptor\_via\_fun:aligned\_alloc\`\`\`I also tried to write the function name who call \`aligned\_alooc\`. But it doesn't work, too.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.Thanks,Chuanqi