rettichschnidi / clang-tidy-misra

MISRA C:2012 and MISRA C++:2008 compliance checkers for clang-tidy
University of Illinois/NCSA Open Source License
157 stars 38 forks source link

Segfault when testing misra-cpp2008-18-4-1. #7

Open dapperfu opened 6 years ago

dapperfu commented 6 years ago

Running:

make VERBOSE=1 -j6 check-tidy-misra

Fails with:

********************
Testing Time: 0.41s
********************
Failing Tests (1):
    clang-tidy-misra unit tests :: cpp2008/18-4-1.cpp

  Expected Passes    : 43
  Unexpected Failures: 1

Testing the command by hand just results in a segfault:

./clang-tidy /tmp/build2/tools/clang/tools/extra/clang-tidy/misra/test/cpp2008/Output/18-4-1.cpp.tmp.cpp --checks=misra-cpp2008-18-4-1 -- --std=c++11
Segmentation fault (core dumped)
rettichschnidi commented 6 years ago

Thanks for the report!

Which operating system, compiler and build type are you using?

dapperfu commented 6 years ago

Ubuntu 18.04. Fails on both Ninja and GNUMake.

Commits of the repos:

llvm: 2da9f1a84d08bb39de022bb169d99883c3d96745 clang: d4b57547051f0bd30420c8e53dc46566c70de30f clang-tools-extra: b7f6587e294d3a6e3dc58cfb89a861ec4643322b misra: 2135e7674eba594ac9b23a6272fddaf61bc4a809

rettichschnidi commented 6 years ago

Release or debug build?

ps: Will not be around for almost one week. Gonna investigate after.

dapperfu commented 6 years ago

Release. Mostly following the build script.

And I'm in no rush.

rettichschnidi commented 5 years ago

It looks like I am able to reproduce the crash with LLVM_USE_SANITIZER set to Address. Will work on it as "soon" as I got time.