Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-compiled ikos is not functional (MacPorts) #220

Closed
szhorvat opened this issue Jul 26, 2023 · 13 comments
Closed

Self-compiled ikos is not functional (MacPorts) #220

szhorvat opened this issue Jul 26, 2023 · 13 comments

Comments

@szhorvat
Copy link

szhorvat commented Jul 26, 2023

I compiled ikos from sources on macOS 13 (I have MacPorts instead of Homebrew, so I could not use the Homebrew installation). I used tag v3.1 directly from this repository. When I try to analyze a barebones CMake project (just a project() line), I get the error below. Do you have any hints for me on how to resolve this?

Output from scanning a barebones CMake project, v3.1
$ikos-scan -vvv cmake .. -G'Unix Makefiles'
[.] Running cmake .. '-GUnix Makefiles'
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Users/szhorvat/ikos/bin/ikos-scan-cc
-- Check for working C compiler: /Users/szhorvat/ikos/bin/ikos-scan-cc - broken
CMake Error at /opt/local/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/Users/szhorvat/ikos/bin/ikos-scan-cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_9e9bb/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_9e9bb.dir/build.make CMakeFiles/cmTC_9e9bb.dir/build
    Building C object CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o
    /Users/szhorvat/ikos/bin/ikos-scan-cc   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -c /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp/testCCompiler.c
    [.] Running /opt/local/libexec/llvm-14/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -c /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp/testCCompiler.c
    [.] Running /opt/local/libexec/llvm-14/bin/clang -c -emit-llvm -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o.d -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D__IKOS__ -g -O0 -Xclang -disable-O0-optnone /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp/testCCompiler.c -o CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o.bc
    [.] Running ld -r -keep_private_externs CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -sectcreate __WLLVM __llvm_bc /var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/tmpq21vrkkm.llvm_bc -o CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o
    Linking C executable cmTC_9e9bb
    /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9e9bb.dir/link.txt --verbose=1
    /Users/szhorvat/ikos/bin/ikos-scan-cc  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -o cmTC_9e9bb 
    [.] Running /opt/local/libexec/llvm-14/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_9e9bb.dir/testCCompiler.c.o -o cmTC_9e9bb
    [.] Running /opt/local/libexec/llvm-14/bin/llvm-objdump -s -section=__llvm_bc cmTC_9e9bb
    /opt/local/libexec/llvm-14/bin/llvm-objdump: error: unknown argument '-e'
    Traceback (most recent call last):
      File "/Users/szhorvat/ikos/bin/ikos-scan-cc", line 65, in <module>
        ikos.scan.compile_main('cc', sys.argv)
      File "/Users/szhorvat/ikos/lib/python3.11/site-packages/ikos/scan.py", line 735, in compile_main
        extract_bitcode(parser.output_file, bc_path)
      File "/Users/szhorvat/ikos/lib/python3.11/site-packages/ikos/scan.py", line 571, in extract_bitcode
        output = check_output(cmd)
                 ^^^^^^^^^^^^^^^^^
      File "/Users/szhorvat/ikos/lib/python3.11/site-packages/ikos/scan.py", line 441, in check_output
        return subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 466, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/llvm-objdump', '-s', '-section=__llvm_bc', 'cmTC_9e9bb']' returned non-zero exit status 1.
    make[1]: *** [cmTC_9e9bb] Error 1
    make[1]: *** Deleting file `cmTC_9e9bb'
    make: *** [cmTC_9e9bb/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "/Users/szhorvat/cmake-test/build/CMakeFiles/CMakeOutput.log".
See also "/Users/szhorvat/cmake-test/build/CMakeFiles/CMakeError.log".

If I build the current master branch of ikos, the error is different:

Output from scanning a barebones CMake project, `master`
$ ikos-scan -vvv cmake .. -G'Unix Makefiles'
[.] Running cmake .. '-GUnix Makefiles'
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Users/szhorvat/ikos/bin/ikos-scan-cc
-- Check for working C compiler: /Users/szhorvat/ikos/bin/ikos-scan-cc - broken
CMake Error at /opt/local/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/Users/szhorvat/ikos/bin/ikos-scan-cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_98817/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_98817.dir/build.make CMakeFiles/cmTC_98817.dir/build
    Building C object CMakeFiles/cmTC_98817.dir/testCCompiler.c.o
    /Users/szhorvat/ikos/bin/ikos-scan-cc   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_98817.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -c /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp/testCCompiler.c
    [.] Running /opt/local/libexec/llvm-14/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_98817.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -c /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp/testCCompiler.c
    [.] Running /opt/local/libexec/llvm-14/bin/clang -c -emit-llvm -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_98817.dir/testCCompiler.c.o.d -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D__IKOS__ -g -O0 -Xclang -disable-O0-optnone /Users/szhorvat/cmake-test/build/CMakeFiles/CMakeTmp/testCCompiler.c -o CMakeFiles/cmTC_98817.dir/testCCompiler.c.o.bc
    [.] Running ld -r -keep_private_externs CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -sectcreate __WLLVM __llvm_bc /var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/tmpoztc6l97.llvm_bc -o CMakeFiles/cmTC_98817.dir/testCCompiler.c.o
    Linking C executable cmTC_98817
    /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_98817.dir/link.txt --verbose=1
    /Users/szhorvat/ikos/bin/ikos-scan-cc  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -o cmTC_98817 
    [.] Running /opt/local/libexec/llvm-14/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_98817.dir/testCCompiler.c.o -o cmTC_98817
    [.] Running /opt/local/libexec/llvm-14/bin/llvm-objdump -s --section=__llvm_bc cmTC_98817
    [.] Running /opt/local/libexec/llvm-14/bin/llvm-link cmake-test/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_98817.dir/testCCompiler.c.o.bc -o cmTC_98817.bc
    /opt/local/libexec/llvm-14/bin/llvm-link: No such file or directory
    make[1]: *** [cmTC_98817] Error 1
    make[1]: *** Deleting file `cmTC_98817'
    make: *** [cmTC_98817/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "/Users/szhorvat/cmake-test/build/CMakeFiles/CMakeOutput.log".
See also "/Users/szhorvat/cmake-test/build/CMakeFiles/CMakeError.log".

For reference, this is the output from configuring ikos:

Configuring with CMake
 $ CC=clang-mp-14 CXX=clang++-mp-14 LLVM_ROOT=/opt/local/libexec/llvm-14 cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/ikos -DCMAKE_PREFIX_PATH='/opt/local;/opt/local/libexec/onetbb'
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/local/bin/clang-mp-14 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/clang++-mp-14 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Install prefix: /Users/szhorvat/ikos
-- Build type: Release
-- CMake version: 3.24.4
-- CMake generator: Ninja
-- Including core
-- Found Boost: /opt/local/include (found version "1.76.0")
-- Found the following Boost libraries:
--   unit_test_framework
-- Found GMP: /opt/local/include (found version "6.2.1") 
-- Found TBB: /opt/local/libexec/onetbb/include (found suitable version "12090", minimum required is "2")  
-- Found MPFR: /opt/local/include (found version "4.2.0") 
-- Found PPL: /opt/local/include (found version "1.2") 
-- Could NOT find APRON. Please provide -DAPRON_ROOT=/path/to/apron (missing: APRON_INCLUDE_DIR APRON_APRON_LIB APRON_BOX_LIB APRON_OCT_LIB APRON_POLKA_LIB APRON_PPL_LIB APRON_PKGRID_LIB) 
-- Performing Test CXX_SUPPORTS_CXX14
-- Performing Test CXX_SUPPORTS_CXX14 - Success
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test CXX_SUPPORTS_WEVERYTHING
-- Performing Test CXX_SUPPORTS_WEVERYTHING - Success
-- Performing Test CXX_SUPPORTS_WNO_SWITCH_ENUM
-- Performing Test CXX_SUPPORTS_WNO_SWITCH_ENUM - Success
-- Performing Test CXX_SUPPORTS_WNO_PADDED
-- Performing Test CXX_SUPPORTS_WNO_PADDED - Success
-- Performing Test CXX_SUPPORTS_WNO_CXX98_COMPAT
-- Performing Test CXX_SUPPORTS_WNO_CXX98_COMPAT - Success
-- Performing Test CXX_SUPPORTS_WNO_CXX98_COMPAT_PEDANTIC
-- Performing Test CXX_SUPPORTS_WNO_CXX98_COMPAT_PEDANTIC - Success
-- Performing Test CXX_SUPPORTS_WNO_COVERED_SWITCH_DEFAULT
-- Performing Test CXX_SUPPORTS_WNO_COVERED_SWITCH_DEFAULT - Success
-- Performing Test CXX_SUPPORTS_WNO_WEAK_VTABLES
-- Performing Test CXX_SUPPORTS_WNO_WEAK_VTABLES - Success
-- Performing Test CXX_SUPPORTS_WNO_EXIT_TIME_DESTRUCTORS
-- Performing Test CXX_SUPPORTS_WNO_EXIT_TIME_DESTRUCTORS - Success
-- Performing Test CXX_SUPPORTS_WNO_GLOBAL_CONSTRUCTORS
-- Performing Test CXX_SUPPORTS_WNO_GLOBAL_CONSTRUCTORS - Success
-- Performing Test CXX_SUPPORTS_WNO_DISABLED_MACRO_EXPANSION
-- Performing Test CXX_SUPPORTS_WNO_DISABLED_MACRO_EXPANSION - Success
-- Performing Test CXX_SUPPORTS_WNO_USED_BUT_MARKED_UNUSED
-- Performing Test CXX_SUPPORTS_WNO_USED_BUT_MARKED_UNUSED - Success
-- Found Doxygen: /opt/local/bin/doxygen (found version "1.9.3") found components: doxygen missing components: dot
-- Including ar
-- Found Boost: /opt/local/include (found version "1.76.0")
-- Including frontend/llvm
-- Found Boost: /opt/local/include (found version "1.76.0")
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found LLVM: /opt/local/libexec/llvm-14 (found version "14.0.6") 
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /opt/local/lib/libffi.dylib  
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /opt/local/lib/libcurses.dylib  
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.2.13") 
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found version "2.10.4") 
-- Performing Test LLVM_LIBSTDCXX_MIN
-- Performing Test LLVM_LIBSTDCXX_MIN - Success
-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - Success
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - found
-- Performing Test macos_signposts_usable
-- Performing Test macos_signposts_usable - Success
-- Linker detection: ld64
CMake Warning at frontend/llvm/test/regression/pass/CMakeLists.txt:18 (message):
  Could NOT find FileCheck.  Tests for ikos-pp are disabled.


CMake Warning at frontend/llvm/test/regression/import/CMakeLists.txt:18 (message):
  Could NOT find FileCheck.  Tests for llvm-to-ar are disabled.


-- Including analyzer
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found Boost: /opt/local/include (found version "1.76.0")
-- Found the following Boost libraries:
--   filesystem
--   system
--   thread
-- Found SQLite3: /opt/local/include (found version "3.42.0") 
-- Could NOT find APRON. Please provide -DAPRON_ROOT=/path/to/apron (missing: APRON_INCLUDE_DIR APRON_APRON_LIB APRON_BOX_LIB APRON_OCT_LIB APRON_POLKA_LIB APRON_PPL_LIB APRON_PKGRID_LIB) 
-- Found PythonInterp: /opt/local/bin/python3.11 (found version "3.11.4") 
-- Building with -fPIC
-- Found Clang: /opt/local/libexec/llvm-14/bin/clang (found version "14.0.6") 
-- Performing Test CXX_SUPPORTS_WNO_C99_EXTENSIONS
-- Performing Test CXX_SUPPORTS_WNO_C99_EXTENSIONS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/szhorvat/Repos/ikos/build
@szhorvat
Copy link
Author

When running the test suite, several tests fail.

Test suite run with `master`
$ ctest --output-on-failure 
Test project /Users/szhorvat/Repos/ikos/build
      Start 38: analysis-buffer-overflow
      Start 40: analysis-memory
      Start 41: analysis-null-pointer-dereference
      Start 42: analysis-assert-prover
      Start 43: analysis-uninitialized-variable
      Start 44: analysis-unaligned-pointer
      Start 45: analysis-signed-int-overflow
      Start 46: analysis-unsigned-int-overflow
 1/52 Test #44: analysis-unaligned-pointer .......................***Failed    0.34 sec
Running tests...
  test-1.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/upa/runtest", line 78, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/upa/test-1.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1.cfulbdg0q/test-1.c.bc']' returned non-zero exit status 1.

      Start 47: analysis-shift-count
 2/52 Test #40: analysis-memory ..................................***Failed    0.34 sec
Running tests...
  test-0-safe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/mem/runtest", line 144, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/mem/test-0-safe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-0-safe.c40eibenh/test-0-safe.c.bc']' returned non-zero exit status 1.

      Start 49: analysis-pointer-compare
 3/52 Test #45: analysis-signed-int-overflow .....................***Failed    0.34 sec
Running tests...
  test-1-overflow-unsafe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/sio/runtest", line 61, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/sio/test-1-overflow-unsafe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-overflow-unsafe.ct3q_iorw/test-1-overflow-unsafe.c.bc']' returned non-zero exit status 1.

      Start 50: analysis-function-call
 4/52 Test #46: analysis-unsigned-int-overflow ...................***Failed    0.35 sec
Running tests...
  test-1-overflow-unsafe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/uio/runtest", line 56, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/uio/test-1-overflow-unsafe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-overflow-unsafe.cu9u1v_sh/test-1-overflow-unsafe.c.bc']' returned non-zero exit status 1.

      Start 51: analysis-double-free
 5/52 Test #43: analysis-uninitialized-variable ..................***Failed    0.36 sec
Running tests...
  test-1-safe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/uva/runtest", line 96, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/uva/test-1-safe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-safe.c1sgnzlsd/test-1-safe.c.bc']' returned non-zero exit status 1.

      Start 52: analysis-soundness
 6/52 Test #47: analysis-shift-count .............................***Failed    0.31 sec
Running tests...
  test-1-negative.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/shc/runtest", line 59, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/shc/test-1-negative.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-negative.c0_i3bf0j/test-1-negative.c.bc']' returned non-zero exit status 1.

      Start  3: core-number-z_number
 7/52 Test #50: analysis-function-call ...........................***Failed    0.31 sec
Running tests...
  test-1-warning.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/fca/runtest", line 56, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/fca/test-1-warning.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-warning.c54rujzou/test-1-warning.c.bc']' returned non-zero exit status 1.

      Start 39: analysis-division-by-zero
 8/52 Test #49: analysis-pointer-compare .........................***Failed    0.32 sec
Running tests...
  test-1-unsafe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/pcmp/runtest", line 57, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/pcmp/test-1-unsafe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-unsafe.c278n3g89/test-1-unsafe.c.bc']' returned non-zero exit status 1.

      Start 48: analysis-pointer-overflow
 9/52 Test #51: analysis-double-free .............................***Failed    0.31 sec
Running tests...
  test-1-error.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/dfa/runtest", line 59, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/dfa/test-1-error.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-error.cvlg70rx4/test-1-error.c.bc']' returned non-zero exit status 1.

      Start  5: core-number-machine_int
10/52 Test  #5: core-number-machine_int ..........................   Passed    0.01 sec
      Start  4: core-number-q_number
11/52 Test  #4: core-number-q_number .............................   Passed    0.01 sec
      Start 20: core-domain-numeric-octagon
12/52 Test #20: core-domain-numeric-octagon ......................   Passed    0.02 sec
      Start  2: core-adt-patricia_tree-set
13/52 Test  #2: core-adt-patricia_tree-set .......................   Passed    0.01 sec
      Start 36: core-example-muzq
14/52 Test #36: core-example-muzq ................................   Passed    0.02 sec
      Start  1: core-adt-patricia_tree-map
15/52 Test  #1: core-adt-patricia_tree-map .......................   Passed    0.02 sec
      Start  7: core-value-numeric-interval
16/52 Test  #7: core-value-numeric-interval ......................   Passed    0.03 sec
      Start 12: core-value-machine_int-congruence
17/52 Test #12: core-value-machine_int-congruence ................   Passed    0.02 sec
      Start  6: core-value-numeric-constant
18/52 Test  #6: core-value-numeric-constant ......................   Passed    0.01 sec
      Start 26: core-domain-numeric-var_packing_dbm_congruence
19/52 Test #26: core-domain-numeric-var_packing_dbm_congruence ...   Passed    0.01 sec
      Start  8: core-value-numeric-congruence
20/52 Test  #8: core-value-numeric-congruence ....................   Passed    0.01 sec
      Start 34: core-domain-uninitialized-separate_domain
21/52 Test #34: core-domain-uninitialized-separate_domain ........   Passed    0.01 sec
      Start 25: core-domain-numeric-var_packing_dbm
22/52 Test #25: core-domain-numeric-var_packing_dbm ..............   Passed    0.01 sec
      Start 24: core-domain-numeric-var_packing_domain
23/52 Test #24: core-domain-numeric-var_packing_domain ...........   Passed    0.01 sec
      Start 33: core-domain-nullity-separate_domain
24/52 Test #33: core-domain-nullity-separate_domain ..............   Passed    0.01 sec
      Start 32: core-domain-pointer-solver
25/52 Test #32: core-domain-pointer-solver .......................   Passed    0.01 sec
      Start 35: core-domain-memory-partitioning
26/52 Test #38: analysis-buffer-overflow .........................***Failed    0.90 sec
Running tests...
  test-1.c ... Passed
  test-1-unsafe.c ... Passed
  test-2.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/boa/runtest", line 292, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/boa/test-2.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-2.c6yryyxy5/test-2.c.bc']' returned non-zero exit status 1.

      Start 29: core-domain-machine_int-interval_congruence
27/52 Test #41: analysis-null-pointer-dereference ................***Failed    0.91 sec
Running tests...
  test-1.c ... Passed
  test-2.c ... Passed
  test-3.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/null/runtest", line 78, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/null/test-3.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-3.cerz9pczq/test-3.c.bc']' returned non-zero exit status 1.

      Start 30: core-domain-machine_int-numeric_domain_adapter
28/52 Test #35: core-domain-memory-partitioning ..................   Passed    0.01 sec
      Start 31: core-domain-machine_int-polymorphic_domain
29/52 Test #29: core-domain-machine_int-interval_congruence ......   Passed    0.01 sec
      Start 19: core-domain-numeric-dbm
30/52 Test #30: core-domain-machine_int-numeric_domain_adapter ...   Passed    0.01 sec
      Start 28: core-domain-machine_int-congruence
31/52 Test #31: core-domain-machine_int-polymorphic_domain .......   Passed    0.02 sec
      Start 22: core-domain-numeric-gauge_interval_congruence
32/52 Test #19: core-domain-numeric-dbm ..........................   Passed    0.02 sec
      Start 23: core-domain-numeric-union
33/52 Test #28: core-domain-machine_int-congruence ...............   Passed    0.01 sec
      Start 16: core-domain-numeric-interval
34/52 Test #22: core-domain-numeric-gauge_interval_congruence ....   Passed    0.01 sec
      Start 11: core-value-machine_int-constant
35/52 Test #23: core-domain-numeric-union ........................   Passed    0.01 sec
      Start 18: core-domain-numeric-interval_congruence
36/52 Test #16: core-domain-numeric-interval .....................   Passed    0.02 sec
      Start 17: core-domain-numeric-congruence
37/52 Test #11: core-value-machine_int-constant ..................   Passed    0.02 sec
      Start 10: core-value-machine_int-interval
38/52 Test #18: core-domain-numeric-interval_congruence ..........   Passed    0.01 sec
      Start 27: core-domain-machine_int-interval
39/52 Test #17: core-domain-numeric-congruence ...................   Passed    0.01 sec
      Start 37: core-fixpoint-wpo
40/52 Test #10: core-value-machine_int-interval ..................   Passed    0.02 sec
      Start  9: core-value-numeric-gauge
41/52 Test #27: core-domain-machine_int-interval .................   Passed    0.01 sec
      Start 15: core-domain-numeric-constant
42/52 Test #52: analysis-soundness ...............................***Failed    0.62 sec
Running tests...
  test-store.c ... Passed
  test-memcpy.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/sound/runtest", line 61, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/sound/test-memcpy.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-memcpy.cl_jlfgi_/test-memcpy.c.bc']' returned non-zero exit status 1.

      Start 21: core-domain-numeric-gauge
43/52 Test #37: core-fixpoint-wpo ................................   Passed    0.02 sec
      Start 14: core-domain-discrete_domain
44/52 Test #15: core-domain-numeric-constant .....................   Passed    0.01 sec
      Start 13: core-value-machine_int-interval_congruence
45/52 Test  #9: core-value-numeric-gauge .........................   Passed    0.02 sec
46/52 Test #14: core-domain-discrete_domain ......................   Passed    0.01 sec
47/52 Test #21: core-domain-numeric-gauge ........................   Passed    0.01 sec
48/52 Test #13: core-value-machine_int-interval_congruence .......   Passed    0.01 sec
49/52 Test #48: analysis-pointer-overflow ........................   Passed    0.74 sec
50/52 Test #39: analysis-division-by-zero ........................   Passed    0.91 sec
51/52 Test  #3: core-number-z_number .............................   Passed    1.59 sec
52/52 Test #42: analysis-assert-prover ...........................***Failed    8.68 sec
Running tests...
  01.c ... Passed
  02.c ... Passed
  03.c ... Passed
  04.c ... Passed
  05.c ... Passed
  06.c ... Passed
  07.c ... Passed
  08.c (interval) ... Passed
  08.c (dbm) ... Passed
  09.c ... Passed
  10.c ... Passed
  11.c (interval) ... Passed
  11.c (gauge-interval-congruence) ... Passed
  12.c ... Passed
  13.c ... Passed
  14.c ... Passed
  15.c ... Passed
  16.c ... Passed
  17.c ... Passed
  18.c ... Passed
  19.c ... Passed
  20.c ... Passed
  21.c ... Passed
  22.c ... Passed
  23.c ... Passed
  24.c (interval) ... Passed
  24.c (dbm) ... Passed
  24.c (gauge-interval-congruence) ... Passed
  25.c (interval) ... Passed
  25.c (gauge-interval-congruence) ... Passed
  26.c ... Passed
  27.c ... Passed
  28.c (interval) ... Passed
  28.c (dbm) ... Passed
  29.c ... Passed
  30.c ... Passed
  31.c ... Passed
  32.c ... Passed
  33.c ... Passed
  34.c ... Passed
  35.c ... Passed
  36.c ... Passed
  37.c ... Passed
  38.c ... Passed
  39.c (interval) ... Passed
  39.c (dbm) ... Passed
  40.c ... Passed
  41.c ... Passed
  42.c ... Passed
  43.c ... Passed
  44.c ... Passed
  45.c ... Passed
  46.c ... Passed
  47.c ... Passed
  48-volatile-safe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/prover/runtest", line 204, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/prover/48-volatile-safe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-48-volatile-safe.cguz_2ln4/48-volatile-safe.c.bc']' returned non-zero exit status 1.


75% tests passed, 13 tests failed out of 52

Total Test time (real) =   8.69 sec

The following tests FAILED:
	 38 - analysis-buffer-overflow (Failed)
	 40 - analysis-memory (Failed)
	 41 - analysis-null-pointer-dereference (Failed)
	 42 - analysis-assert-prover (Failed)
	 43 - analysis-uninitialized-variable (Failed)
	 44 - analysis-unaligned-pointer (Failed)
	 45 - analysis-signed-int-overflow (Failed)
	 46 - analysis-unsigned-int-overflow (Failed)
	 47 - analysis-shift-count (Failed)
	 49 - analysis-pointer-compare (Failed)
	 50 - analysis-function-call (Failed)
	 51 - analysis-double-free (Failed)
	 52 - analysis-soundness (Failed)
Errors while running CTest

@szhorvat szhorvat changed the title Self-compiled ikos is not functional Self-compiled ikos is not functional (MacPorts) Jul 26, 2023
@ivanperez-keera
Copy link
Collaborator

ivanperez-keera commented Jul 26, 2023

@szhorvat there was an error regarding -section that was fixed in b9f2566, right after the 3.1 release. Can you checkout the master branch and try again?

EDIT: This is a duplicate of #199 which was fixed in #200.

@ivanperez-keera ivanperez-keera added the T-duplicate Tag: Duplicate label Jul 26, 2023
@ivanperez-keera ivanperez-keera closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
@szhorvat
Copy link
Author

I did try the master branch, but unfortunately that fails with a different error. Please see the top post, I included that error as well.

@ivanperez-keera ivanperez-keera removed the T-duplicate Tag: Duplicate label Jul 26, 2023
@ivanperez-keera
Copy link
Collaborator

ivanperez-keera commented Jul 26, 2023

@szhorvat noted. What do you have in /opt/local/libexec/llvm-14/bin/? Can you ls that directory?

@szhorvat
Copy link
Author

szhorvat commented Jul 26, 2023

This is where MacPorts installs LLVM 14. My understanding of the error is that it is not llvm-link that is missing. Instead it is that command that reports the error, probably about the testCCompiler.c.o.bc file.

~ $ ls /opt/local/libexec/llvm-14/bin/
analyze-build*            lli*                      llvm-objdump*
bugpoint*                 llvm-addr2line@           llvm-opt-report*
c-index-test*             llvm-ar*                  llvm-otool@
clang*                    llvm-as*                  llvm-pdbutil*
clang++@                  llvm-bcanalyzer*          llvm-profdata*
clang-apply-replacements* llvm-bitcode-strip@       llvm-profgen*
clang-change-namespace*   llvm-c-test*              llvm-ranlib@
clang-check*              llvm-cat*                 llvm-rc*
clang-cl@                 llvm-cfi-verify*          llvm-readelf@
clang-cpp@                llvm-config*              llvm-readobj*
clang-doc*                llvm-cov*                 llvm-reduce*
clang-extdef-mapping*     llvm-cvtres*              llvm-rtdyld*
clang-format*             llvm-cxxdump*             llvm-sim*
clang-include-fixer*      llvm-cxxfilt*             llvm-size*
clang-linker-wrapper*     llvm-cxxmap*              llvm-split*
clang-move*               llvm-debuginfod-find*     llvm-stress*
clang-nvlink-wrapper*     llvm-diff*                llvm-strings*
clang-offload-bundler*    llvm-dis*                 llvm-strip@
clang-offload-wrapper*    llvm-dlltool@             llvm-symbolizer*
clang-query*              llvm-dwarfdump*           llvm-tapi-diff*
clang-refactor*           llvm-dwp*                 llvm-tblgen*
clang-rename*             llvm-exegesis*            llvm-tli-checker*
clang-reorder-fields*     llvm-extract*             llvm-undname*
clang-repl*               llvm-gsymutil*            llvm-windres@
clang-scan-deps*          llvm-ifs*                 llvm-xray*
clang-tidy*               llvm-install-name-tool@   modularize*
clangd*                   llvm-jitlink*             opt*
clangd-xpc-test-client*   llvm-lib@                 pp-trace*
diagtool*                 llvm-libtool-darwin*      run-clang-tidy*
dsymutil*                 llvm-link*                sancov*
find-all-symbols*         llvm-lipo*                sanstats*
git-clang-format*         llvm-lto*                 scan-build*
hmaptool*                 llvm-lto2*                scan-build-py*
intercept-build*          llvm-mc*                  scan-view*
ld@                       llvm-mca*                 set-xcode-analyzer*
ld.lld@                   llvm-ml*                  split-file*
ld64.lld@                 llvm-modextract*          verify-uselistorder*
llc*                      llvm-mt*                  wasm-ld@
lld*                      llvm-nm*
lld-link@                 llvm-objcopy*

@ivanperez-keera
Copy link
Collaborator

ivanperez-keera commented Jul 26, 2023

Might this be a duplicate of #203?

EDIT: And, if so, does that workaround also work for you?

@szhorvat
Copy link
Author

Yes, changing that 4 to a 3 does make it work on a trivial CMake project. But let me try it on a real project as well.

@szhorvat
Copy link
Author

szhorvat commented Jul 26, 2023

The workaround suggested in #203 allows the configuration step to succeed.

But on my real project it still fails at the linking step with the same llvm-link: No such file or directory error. I'll try to produce a minimal example tomorrow, but now it's too late at night here.

@ivanperez-keera
Copy link
Collaborator

Ok, sounds good. Looking forward!

@szhorvat
Copy link
Author

szhorvat commented Jul 27, 2023

I should note that I am completely new to ikos and I was simply trying to see if it could be useful for our project, igraph. Unfortunately, I don't think I'll have a lot of time to get things working, and I was just about to give up, when I realized that igraph's build system will automatically make use of ccache when available, and this was somehow interfering with ikos.

Once ccache is disabled, compilation succeeds, but analysis fails with:

error: unsupported llvm instruction: fneg [1]

I don't think I'll have time to keep trying to get this working, but for reference, this is what I did:

  • Apply the workaround from cmake fails with llvm-link no such file #203
  • Configure igraph using ikos-scan cmake .. -G'Unix Makefiles' -DIGRAPH_WARNINGS_AS_ERRORS=OFF -DUSE_CCACHE=OFF (within in the usual build directory)
  • Build the static library, ikos-scan make
  • Build a test executable of your choice for analysis, ikos-scan -vvv make example_igraph_create, and choose "yes" at the Analyze tests/example_igraph_create? [Y/n] prompt.
Analyze tests/example_igraph_create? [Y/n] 
[*] Running ikos tests/example_igraph_create.bc -o tests/example_igraph_create.db
[.] Running /opt/local/bin/python3.11 /Users/szhorvat/ikos/bin/ikos tests/example_igraph_create.bc -o tests/example_igraph_create.db --color=auto --log=all
[*] Running ikos preprocessor
[.] Running /Users/szhorvat/ikos/bin/ikos-pp -opt=basic -entry-points=main tests/example_igraph_create.bc -o /var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-ag5p000f/example_igraph_create.pp.bc
[*] Running ikos analyzer
[.] Running /Users/szhorvat/ikos/bin/ikos-analyzer -a=dbz,dfa,sound,nullity,shc,pcmp,uva,sio,boa,dca,fca,dbg,prover -d=interval -entry-points=main -globals-init=skip-big-arrays -proc=inter -j=1 -widening-strategy=widen -widening-delay=1 -widening-period=1 -narrowing-strategy=narrow -allow-dbg-mismatch -display-checks=no -display-inv=no -log=all -progress=auto /var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-ag5p000f/example_igraph_create.pp.bc -o tests/example_igraph_create.db
[.] Creating output database 'tests/example_igraph_create.db'
[.] Loading LLVM bitcode
[.] Verifying integrity of LLVM bitcode
[.] Checking for debug information
[*] Translating LLVM bitcode to AR
ikos-analyzer: /var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-ag5p000f/example_igraph_create.pp.bc: error: unsupported llvm instruction: fneg [1]
ikos: error: a run-time error occurred

A similar issue was reported in #197.

EDIT: The patch from #197 allows me to finally get results. Now to figure out how to make ikos understand that a certain function will never return, and get rid of lots of warnings ...

I'll leave it to you to close this issue, @ivanperez-keera. It seems that the problems I saw are already better documented in other issues.

@szhorvat
Copy link
Author

szhorvat commented Jul 27, 2023

I should note that a significant portion of unit tests still fails:

Test failures
77% tests passed, 13 tests failed out of 56

Total Test time (real) =   9.91 sec

The following tests FAILED:
	 42 - analysis-buffer-overflow (Failed)
	 44 - analysis-memory (Failed)
	 45 - analysis-null-pointer-dereference (Failed)
	 46 - analysis-assert-prover (Failed)
	 47 - analysis-uninitialized-variable (Failed)
	 48 - analysis-unaligned-pointer (Failed)
	 49 - analysis-signed-int-overflow (Failed)
	 50 - analysis-unsigned-int-overflow (Failed)
	 51 - analysis-shift-count (Failed)
	 53 - analysis-pointer-compare (Failed)
	 54 - analysis-function-call (Failed)
	 55 - analysis-double-free (Failed)
	 56 - analysis-soundness (Failed)
Errors while running CTest
Output from these tests are in: /Users/szhorvat/Repos/ikos/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
ninja: build stopped: subcommand failed.
$ ctest --rerun-failed --output-on-failure
Test project /Users/szhorvat/Repos/ikos/build
      Start 42: analysis-buffer-overflow
      Start 44: analysis-memory
      Start 45: analysis-null-pointer-dereference
      Start 46: analysis-assert-prover
      Start 47: analysis-uninitialized-variable
      Start 48: analysis-unaligned-pointer
      Start 49: analysis-signed-int-overflow
      Start 50: analysis-unsigned-int-overflow
 1/13 Test #47: analysis-uninitialized-variable .....***Failed    0.33 sec
Running tests...
  test-1-safe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/uva/runtest", line 96, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/uva/test-1-safe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-safe.cunp7gxuz/test-1-safe.c.bc']' returned non-zero exit status 1.

      Start 51: analysis-shift-count
 2/13 Test #44: analysis-memory .....................***Failed    0.33 sec
Running tests...
  test-0-safe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/mem/runtest", line 144, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/mem/test-0-safe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-0-safe.c8cb0yjzt/test-0-safe.c.bc']' returned non-zero exit status 1.

      Start 53: analysis-pointer-compare
 3/13 Test #50: analysis-unsigned-int-overflow ......***Failed    0.32 sec
Running tests...
  test-1-overflow-unsafe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/uio/runtest", line 56, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/uio/test-1-overflow-unsafe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-overflow-unsafe.cae5h45qh/test-1-overflow-unsafe.c.bc']' returned non-zero exit status 1.

      Start 54: analysis-function-call
 4/13 Test #48: analysis-unaligned-pointer ..........***Failed    0.33 sec
Running tests...
  test-1.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/upa/runtest", line 78, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/upa/test-1.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1.ciut__kwf/test-1.c.bc']' returned non-zero exit status 1.

      Start 55: analysis-double-free
 5/13 Test #49: analysis-signed-int-overflow ........***Failed    0.33 sec
Running tests...
  test-1-overflow-unsafe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/sio/runtest", line 61, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/sio/test-1-overflow-unsafe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-overflow-unsafe.c9n9uvy65/test-1-overflow-unsafe.c.bc']' returned non-zero exit status 1.

      Start 56: analysis-soundness
 6/13 Test #53: analysis-pointer-compare ............***Failed    0.30 sec
Running tests...
  test-1-unsafe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/pcmp/runtest", line 57, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/pcmp/test-1-unsafe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-unsafe.cehcqdxso/test-1-unsafe.c.bc']' returned non-zero exit status 1.

 7/13 Test #55: analysis-double-free ................***Failed    0.30 sec
Running tests...
  test-1-error.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/dfa/runtest", line 59, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/dfa/test-1-error.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-error.cg3v_ywnb/test-1-error.c.bc']' returned non-zero exit status 1.

 8/13 Test #51: analysis-shift-count ................***Failed    0.31 sec
Running tests...
  test-1-negative.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/shc/runtest", line 59, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/shc/test-1-negative.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-negative.cjih2k75p/test-1-negative.c.bc']' returned non-zero exit status 1.

 9/13 Test #54: analysis-function-call ..............***Failed    0.31 sec
Running tests...
  test-1-warning.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/fca/runtest", line 56, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/fca/test-1-warning.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-1-warning.culjgimlf/test-1-warning.c.bc']' returned non-zero exit status 1.

10/13 Test #42: analysis-buffer-overflow ............***Failed    0.78 sec
Running tests...
  test-1.c ... Passed
  test-1-unsafe.c ... Passed
  test-2.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/boa/runtest", line 292, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/boa/test-2.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-2.cs7hak8ht/test-2.c.bc']' returned non-zero exit status 1.

11/13 Test #45: analysis-null-pointer-dereference ...***Failed    0.78 sec
Running tests...
  test-1.c ... Passed
  test-2.c ... Passed
  test-3.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/null/runtest", line 78, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/null/test-3.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-3.cv4hwbuwc/test-3.c.bc']' returned non-zero exit status 1.

12/13 Test #56: analysis-soundness ..................***Failed    0.47 sec
Running tests...
  test-store.c ... Passed
  test-memcpy.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/sound/runtest", line 61, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/sound/test-memcpy.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-test-memcpy.cc2myjxeo/test-memcpy.c.bc']' returned non-zero exit status 1.

13/13 Test #46: analysis-assert-prover ..............***Failed    8.40 sec
Running tests...
  01.c ... Passed
  02.c ... Passed
  03.c ... Passed
  04.c ... Passed
  05.c ... Passed
  06.c ... Passed
  07.c ... Passed
  08.c (interval) ... Passed
  08.c (dbm) ... Passed
  09.c ... Passed
  10.c ... Passed
  11.c (interval) ... Passed
  11.c (gauge-interval-congruence) ... Passed
  12.c ... Passed
  13.c ... Passed
  14.c ... Passed
  15.c ... Passed
  16.c ... Passed
  17.c ... Passed
  18.c ... Passed
  19.c ... Passed
  20.c ... Passed
  21.c ... Passed
  22.c ... Passed
  23.c ... Passed
  24.c (interval) ... Passed
  24.c (dbm) ... Passed
  24.c (gauge-interval-congruence) ... Passed
  25.c (interval) ... Passed
  25.c (gauge-interval-congruence) ... Passed
  26.c ... Passed
  27.c ... Passed
  28.c (interval) ... Passed
  28.c (dbm) ... Passed
  29.c ... Passed
  30.c ... Passed
  31.c ... Passed
  32.c ... Passed
  33.c ... Passed
  34.c ... Passed
  35.c ... Passed
  36.c ... Passed
  37.c ... Passed
  38.c ... Passed
  39.c (interval) ... Passed
  39.c (dbm) ... Passed
  40.c ... Passed
  41.c ... Passed
  42.c ... Passed
  43.c ... Passed
  44.c ... Passed
  45.c ... Passed
  46.c ... Passed
  47.c ... Passed
  48-volatile-safe.c ... Traceback (most recent call last):
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/prover/runtest", line 204, in <module>
    t.run()
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 417, in run
    result = t.run(self.root, output_db)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/szhorvat/Repos/ikos/analyzer/test/regression/libruntest.py", line 293, in run
    subprocess.check_call(cmd,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/local/libexec/llvm-14/bin/clang', '-c', '-emit-llvm', '-Wall', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=0', '-D__IKOS__', '-g', '-O0', '-Xclang', '-disable-O0-optnone', '/Users/szhorvat/Repos/ikos/analyzer/test/regression/prover/48-volatile-safe.c', '-o', '/var/folders/31/l_62jfs110lf0dh7k5n_y2th0000gq/T/ikos-48-volatile-safe.civjzpyer/48-volatile-safe.c.bc']' returned non-zero exit status 1.


0% tests passed, 13 tests failed out of 13

Total Test time (real) =   8.41 sec

The following tests FAILED:
	 42 - analysis-buffer-overflow (Failed)
	 44 - analysis-memory (Failed)
	 45 - analysis-null-pointer-dereference (Failed)
	 46 - analysis-assert-prover (Failed)
	 47 - analysis-uninitialized-variable (Failed)
	 48 - analysis-unaligned-pointer (Failed)
	 49 - analysis-signed-int-overflow (Failed)
	 50 - analysis-unsigned-int-overflow (Failed)
	 51 - analysis-shift-count (Failed)
	 53 - analysis-pointer-compare (Failed)
	 54 - analysis-function-call (Failed)
	 55 - analysis-double-free (Failed)
	 56 - analysis-soundness (Failed)
Errors while running CTest

Also, I couldn't make sense of any of the "The program is definitely UNSAFE" claims (except the one I noted in #221). ikos's claims seem to be incorrect. Something is definitely not working properly.

@ivanperez-keera
Copy link
Collaborator

This is very useful as documentation. I'll mention it in other issues that seem to report the same points (#203 , #197). Thank you @szhorvat for taking the time and for the detailed info.

@ivanperez-keera ivanperez-keera closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2023
@ivanperez-keera
Copy link
Collaborator

@szhorvat I wanted to mention that #230 also tries to address one of your concerns. You may want to try it (actually, your input would be useful to see if that solution should be adopted).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants