-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
goblintGoblint-specific problemGoblint-specific problemparsing-succeedsprojectProject to analyzeProject to analyze
Description
- Goblint: goblint/analyzer@8fb8d8f
- Tmux: https://github.com/tmux/tmux/tree/47923bd5f62f49924e20f3cabcff9350968449a2
Attempt:
./goblint -v [path to tmux repository]/Makefile- or, as an intermediate step, to only check whether it can be build with cilly:
sh autogen.sh && ./configure && make CC="cilly --gcc=/usr/bin/gcc --merge --keepmerged" LD="cilly --gcc=/usr/bin/gcc --merge --keepmerged"
Problems and Workarounds:
- missing GNU extended floating point types in CIL (
_Float32,_Float64,_Float32x,_Float64xand_Float128x)
error:This is the same problem as in OpenSSL #7. As a hacky quick fix to find out about other possible problems I patched the goblint-cil implementation: floatsquickfix.patch/usr/include/stdlib.h[140:8-16] : syntax error Parsing errorFatal error: exception Frontc.ParseError("Parse error") - error during merging with cilly:
I think this has something to do with fortify functions which are some form of extern inlining and that it can be tracked back to this code in
/usr/include/x86_64-linux-gnu/bits/stdlib.h:37:37: error: redefinition of ‘realpath’ 37 | __NTH (realpath (const char *__restrict __name, char *__restrict __resolved))usr/include/stdlib.h:and/* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include <bits/stdlib.h> #endifusr/include/x86_64-linux-gnu/bits/stdlib.h:But I haven't found out yet, what exactly causes the problem with cilly.__fortify_function __wur char * __NTH (realpath (const char *__restrict __name, char *__restrict __resolved)) {...}
If one turns off the gcc optionFORTIFIED_SOURCEwith
./goblint -v --set cppflags[+] -D_FORTIFY_SOURCE=0 [path to tmux repository]/Makefile
cilly combines the files without any errors and the analysis is started.
FORTIFY_SOURCEis implicitly enabled (and set to 2) with the activation of optimization level 2 (-O2) in the tmux Makefile.
sim642 and michael-schwarz
Metadata
Metadata
Assignees
Labels
goblintGoblint-specific problemGoblint-specific problemparsing-succeedsprojectProject to analyzeProject to analyze