[cfe-dev] how to tolerate the assertion failures in llvm and clang

George Karpenkov via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 25 11:38:21 PDT 2018


Hi Ella,

> On Jun 24, 2018, at 1:23 AM, alan snape via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> My team is developing a static analysis tool based on clang and llvm, but the assertion failures in the source code of llvm and clang will always crash the program execution, which is not acceptable in a **stable product**.

Each assertion failure is a bug you can report at bugs.llvm.org <http://bugs.llvm.org/>. Do you really get that many?
We at Apple regularly run the clang static analyzer on huge chunks of the internal codebase, and in my understanding Google does the same,
so I am quite surprised this is a problem for you.
 
> The tool analyzes the functions one by one in the Call Graph SCC order, so is there any way to tolerate the assertion failures and continue the analysis on the next function when assertion failures occur on calling some APIs of clang and llvm? (crashes only the analysis of the function (the analysis methods of the FunctionDecl) being analyzed, not the entire program)

I would really like to challenge your assumption here that assertions are unacceptable.

A clean crash with an understandable stack trace means that the problem can be fixed.
Adding layers of indirection which hide those failures means that the bug gets unnoticed,
and the analyzer probably ends up doing something wrong.

Could you clarify what is the common error mode for you?

Regards,
George

> 
> Thanks,
> Ella
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180625/674d570b/attachment.html>


More information about the cfe-dev mailing list