Opened 4 years ago

Closed 4 years ago

#71 closed defect (fixed)

CFA segment fault

Reported by: pabuhr Owned by: Thierry
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

Something in <thread> causes cfa-cc to fail. I can't make the example any smaller.

#include <stdlib>
#include <thread>  // remove and it works

int main() {
    int * values = anew( 5 );
}
cfa test.c
CFA Version 1.0.0 (debug)
*CFA runtime error* program cfa-cpp terminated with segment fault.
Stack back trace for: /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp
(0) /lib/x86_64-linux-gnu/libc.so.6 : (/*unknown*/)+0x354b0 [0x7fe6478e94b0]
(1) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::instantiateArgument(Type*, Initializer*, std::vector<std::vector<ResolvExpr::ExplodedActual, std::allocator<ResolvExpr::ExplodedActual> >, std::allocator<std::vector<ResolvExpr::ExplodedActual, std::allocator<ResolvExpr::ExplodedActual> > > > const&, std::vector<ResolvExpr::ArgPack, std::allocator<ResolvExpr::ArgPack> >&, unsigned long&, SymTab::Indexer const&, unsigned int)+0x1555 [0x8ccfb5]
(2) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : void ResolvExpr::AlternativeFinder::makeFunctionAlternatives<std::back_insert_iterator<std::vector<ResolvExpr::Alternative, std::allocator<ResolvExpr::Alternative> > > >(ResolvExpr::Alternative const&, FunctionType*, std::vector<std::vector<ResolvExpr::ExplodedActual, std::allocator<ResolvExpr::ExplodedActual> >, std::allocator<std::vector<ResolvExpr::ExplodedActual, std::allocator<ResolvExpr::ExplodedActual> > > > const&, std::back_insert_iterator<std::vector<ResolvExpr::Alternative, std::allocator<ResolvExpr::Alternative> > >)+0x390 [0x8dc4c0]
(3) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::visit(UntypedExpr*)+0x3d4 [0x8d1dc4]
(4) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::find(Expression*, bool, bool, bool)+0x4e [0x8ce2de]
(5) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::visit(CastExpr*)+0xea [0x8d2f0a]
(6) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::find(Expression*, bool, bool, bool)+0x4e [0x8ce2de]
(7) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::resolveInVoidContext(Expression*, SymTab::Indexer const&, ResolvExpr::TypeEnvironment&)+0x94 [0x8cf604]
(8) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::findVoidExpression(Expression*&, SymTab::Indexer const&)+0x46 [0x9083c6]
(9) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x7da837]
(10) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x807b2f]
(11) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x7d295e]
(12) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x7dfa94]
(13) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x7fab69]
(14) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x7e1596]
(15) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x80edb5]
(16) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x80f0ef]
(17) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp() [0x83a7f0]
(18) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : InitTweak::fix(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)+0x269 [0x836d19]
(19) /u/pabuhr/software/cfa-cc/lib/cfa/cfa-cpp : main(/*unknown*/)+0x710 [0x5bcef0]

Change History (1)

comment:1 Changed 4 years ago by Aaron Moss <a3moss@…>

Resolution: fixed
Status: assignedclosed

In 7faab5e:

[fixes #71]

Note: See TracTickets for help on using tickets.