Closed kloczek closed 1 year ago
Hi, thanks for reporting this? Which version of gcc are you using (gcc --version)? We use gcc 10 as the base line which builds just fine. With the recent security hardening changes, if you're running a version greater than 10, it's possible that we have new analysis warnings pop up which of course should be fixed. If you are interested in taking a look at fix let me know otherwise, I can pick this up.
Also, if you can let me know which distro/version you are using?
I'm using gcc 13.1.1. I'm using my own distro however that version of gcc you can find in Fedora rawhide.
I just tried this on my Fedora Rawhide (Linux version 6.3.0-0.rc6.20230414git44149752e998.53.fc39.x86_64 (mockbuild@a8b1e6fc26e547649f489eb3d5d335f7) and it compiled fine. Granted, it's not the latest but the gcc version is the same as yours:
gcc (GCC) 13.1.1 20230511 (Red Hat 13.1.1-2) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Did you change anything in the Makefile? I can see some build errors (different than yours) if I change the optimization level but that should always be set to -O2.
Nope.
As source I;m using tar autogenerated from git tag.
[-Werror=analyzer-fd-leak]
error has nothing to do with optimisation options.
It appears that your environment enables link time optimizations (-flto=auto) which causes the above. As a test, try removing that flag.
Now that I have a repro I can investigate and see what the issue is when -flto=auto is set.
So ProcDump is not LTO rerady? 🤔
It depends on what the issue is, could be a false positive in the static analysis when LTO is enabled. I'll look into it.
Hmm so on generate prod binaries is used some static analyse? 🤔
By default, static analysis is always turned on. You are free to remove it if you so choose (just remove the -fanalyzer from the Makefile). Static analysis doesn't have any effect on the built binaries.