Re: Uninitialized variables and F37

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Dave,

On Tuesday, January 25, 2022 9:29:53 AM EST David Malcolm wrote:
> Steve, thanks for putting together these cases.
> 
> I've filed:
>   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104224
> against the gcc analyzer upstream to help me track improving the
> analyzer on this.
> 
> OK if I go ahead and slurp this into the upstream gcc testsuite?

Sure, go ahead. But I guess the global variable test cases can be removed 
since the standard says they should be initialized to 0. (I thought only 
static got that treatment but found out otherwise.)

> What optimization level were you running -fanalyzer at?

I was doing all tests at -O2 since that is how things go through the build 
system. And based on other reports in this thread, it really affects the 
detection of tools - which is a pity, since a compile at -O2 is what we get 
via gating tests.

> (Unfortunately the analyzer is currently affected by that; I'm thinking of
> moving the analysis pass much earlier so that it isn't).
> 
> Running this on Compiler Explorer with gcc trunk with -fanalyzer (no
> optimizations) is:
>   https://godbolt.org/z/T17TbqYdx

Interesting.  I was also using it with -fanalyzer-verbosity=0  to try to get 
a concise warning without following all the branches it used to decide.

Also, the tests that I wrote are a starting point. I didn't try anything heap 
related, as parameters to syscalls, shift operations, floating point 
calculations, or mathematical expressions. I also did not touch on C++ at 
all. To really quantify how the various tools stack up (and hopefully to 
improve detection), we need a good, curated collection of bugs.

Best Regards,
-Steve

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux