2

I'm getting internal errors in Coverity when building a C++11 project. The log shows errors like this:

Internal error #2688: assertion failed at: "edg/src/lower_name.c", line 4810
internal error #2688: assertion failed at: "edg/src/scope_stk.c", line 10898

I'm using Mac OS X (Sierra) and configured the compiler using:

cov-configure --comptype clangcxx -co /usr/bin/c++

Here are all steps to reproduce the issue:

git clone --recursive -b develop https://github.com/actor-framework/actor-framework.git
cd actor-framework
./configure --build-type=debug --with-runtime-checks --no-opencl --no-python
cov-build --dir "cov-int" make

I've uploaded the full build log here (it's huge, you've been warned): https://gist.githubusercontent.com/Neverlord/bb5709452236d584fcaabf56c0ae7295/raw/aad490f79b4fa2fab40dd99ffbe9aa75611b2fff/build-log.txt

Any help is much appreciated.

neverlord
  • 890
  • 6
  • 12
  • 3
    AFAIK, Coverity is a commercial, licensed product with paid-for support. Have you contacted their support? – Sam Varshavchik Mar 29 '17 at 14:23
  • I'm using the free Open Source version of Coverity. The `Troubleshooting` section on Coverity Scan advises to ask questions on stackoverflow... so I figured I'll give it a try. – neverlord Mar 29 '17 at 14:29
  • "Internal error" means a bug in the compiler. Nothing much we can do about that, unless someone from Coverity read this. – Bo Persson Mar 29 '17 at 15:18
  • @BoPersson Somone from Coverity is reading this :) – Caleb Mar 29 '17 at 16:54

1 Answers1

3

I took a peek at the build log, and it doesn't seem related to your Clang configuration (which is good, since that should be using Coverity's Clang-based FE, not the EDG-based FE.

One of the offending compilations is:

/opt/local/bin/g++-mp-4.9 -Dlibcaf_core_shared_EXPORTS -I/opt/local/include -I/Users/jenkins/jenkins_home/workspace/CAF/nightly/actor-framework/libcaf_opencl -I/Users/jenkins/jenkins_home/workspace/CAF/nightly/actor-framework/libcaf_core -I/Users/jenkins/jenkins_home/workspace/CAF/nightly/actor-framework/libcaf_io -I/Users/jenkins/jenkins_home/workspace/CAF/nightly/actor-framework/libcaf_test -I/Users/jenkins/jenkins_home/workspace/CAF/nightly/actor-framework/libcaf_core/. -std=c++11 -Wextra -Wall -pedantic -Wno-missing-field-initializers -fPIC -g -fPIC -o CMakeFiles/libcaf_core_shared.dir/src/abstract_coordinator.cpp.o -c /Users/jenkins/jenkins_home/workspace/CAF/nightly/actor-framework/libcaf_core/src/abstract_coordinator.cpp

The internal assertion doesn't appear to be in Coverity's bug database, so this looks to represent a previously unknown issue in the EDG-based FE. If you could create a reproducer and send it to scan-admin@coverity.com, it would be very much appreciated; internal errors such as this defeat Coverity's error recovery and are generally high priority to be fixed.

Once the code construct that's causing the assertion is identified, it may be possible to work around it (e.g. with --ppp_translator).

The following steps may help you create a reproducer:

$ cov-manage-emit --dir <idir> -tp 'failure()' list

(pick one from the list of failures that matches the internal assertion you see in the build log, note the TU number)

$ cov-manage-emit --dir <idir> --tu <TU> reduce

(reduced file will be placed under /output/preprocessed).

Caleb
  • 1,143
  • 5
  • 13