<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Personally I don’t have any advice on how to deal with ASAN errors. From experience it helps to work with clang and clang libraries built with assertions enabled, it helps to encounter inconsistencies like FunctionDecl/AccessSpecDecl pretty early. What else can be helpful is to have pure clang failing and to remove IWYU itself from the list of suspects.<div class=""><br class=""></div><div class="">You can try to minimize the repro manually or with <a href="https://github.com/llvm/llvm-project/blob/main/clang/utils/creduce-clang-crash.py" class="">creduce-clang-crash.py</a> or with <a href="http://embed.cs.utah.edu/creduce/" class="">C-Reduce itself</a>.</div><div class=""><br class=""></div><div class="">Hope this helps,</div><div class="">Volodymyr<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 23, 2021, at 12:00, Kim Gräsman via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">We've had a curious bug reported on IWYU, where CastExpr::getConversionFunction does not return a FunctionDecl.</div><div class=""><br class=""></div><div class="">After some research, it turns out we get an AccessSpecDecl instead, which seems like a strange conversion function.</div><div class=""><br class=""></div><div class="">I tried running with ASAN enabled for only IWYU, but didn't get any useful results, but eventually I managed to repro a non-IWYU contained example. That in turn led me to:<br class=""></div><div class=""><a href="https://bugs.llvm.org/show_bug.cgi?id=44972" target="_blank" class="">https://bugs.llvm.org/show_bug.cgi?id=44972</a></div><div class=""><br class=""></div><div class="">I'm not sure where to go from there, though... It seems the parser somehow triggers a use-after-free in BumpPtrAllocator. Can I narrow it down somehow? I have an 800K preprocessed repro, but from cursory experiments ASAN triggers use-after-poison there on basically anything.</div><div class=""><br class=""></div><div class="">Thanks for any ideas for narrowing down the issue,</div><div class="">- Kim<br class=""></div></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></div></body></html>