Help on bug

Hi everyone,

Can anybody help me to solve this issue:

I’m new here and I don’t have an idea on where to start.

Thanks in advance.

Hi Paulo,

I suggest you repost your request, and make it as trivial as possible for someone to notice that they have the kind of knowledge that will allow them to help you. You may think “they just have to click the link to see what I am asking about” and that’s true; however, when someone has to process a thousand or more emails daily (as many do) then they are very motivated not to take that extra effort, and might not even bother reading the body of your message. This greatly reduces the chance that someone with the correct knowledge will even realize you are asking for help in their area of expertise.

If your subject line said something like “Help with analyzer issue” then people who are familiar with the analyzer will instantly know they might be able to help, even without reading the email. Even better, you have not taken up the valuable time of people who do not know anything about the analyzer, which demonstrates that you are a courteous person, and so some stranger on the list will be more willing to help you.

I personally know nothing about the analyzer and so I cannot help you with this problem; but I hope my reply will help you find someone who can.



Looking at the issue you probably want to make expression evaluation smarter in the analyzer. The files you want to touch is probably in the folder clang/lib/StaticAnalyzer/Core.
It was a while since I last touched the analyzer core so I might be a bit rusty, bit I would start looking at SimpleSValBuilder.cpp and the evalBinOpNN and similar functions. For this task I think you need to understand what a symbolic value is, and familiarize yourself with some of the nomenclature the analyzer is using (e.g. non-loc mostly means r-value and loc mostly means l-value). Also make sure that after your change the potential division by zero errors are still diagnosed.

I also added Artem so he has the chance to correct me if I am wrong.