Menu

Error on template simplification

Akdeniz
2015-04-06
2015-04-11
  • Akdeniz

    Akdeniz - 2015-04-06

    Hi im getting below exception when executing this command.

    cppcheck -j 16 --exception-handling --report-progress --xml --xml-version=2 -I src --std=c++11 --suppress=duplicateBreak src/dm/compression/impl/re_pair.cpp 2> cppcheck.xml
    
    Checking src/dm/compression/impl/re_pair.cpp...
    Internal error: cppcheck received signal SIGSEGV, Segmentation fault - SEGV_MAPERR (at 0x0xffffffffffffffe8).
    Callstack:
    #0  0x000000559d9e in TemplateSimplifier::simplifyTemplateInstantiations(TokenList&, ErrorLogger*, Settings const*, Token const*, std::list<Token*, std::allocator<Token*> >&, std::set<std::string, std::less<std::string>, std::allocator<std::string> >&)
    #1  0x00000055c59c in TemplateSimplifier::simplifyTemplates(TokenList&, ErrorLogger*, Settings const*, bool&)
    #2  0x000000582607 in Tokenizer::simplifyTemplates()
    #3  0x00000059da7b in Tokenizer::simplifyTokenList1(char const*)
    #4  0x00000059df1e in Tokenizer::tokenize(std::istream&, char const*, std::string const&, bool)
    #5  0x00000050810e in CppCheck::checkFile(std::string const&, char const*)
    #6  0x00000050c458 in CppCheck::processFile(std::string const&, std::string const&)
    #7  0x00000050d8d0 in CppCheck::check(std::string const&)
    #8  0x000000443106 in ThreadExecutor::check()
    #9  0x00000043d4f0 in CppCheckExecutor::check_internal(CppCheck&, int, char const* const*)
    #10 0x00000043e8cd in CppCheckExecutor::check_wrapper(CppCheck&, int, char const* const*)
    #11 0x00000043e995 in CppCheckExecutor::check(int, char const* const*)
    #12 0x000000433833 in cppcheck(main+0x23)
    #13 0x7f22142f876d in /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)
    #14 0x000000434bc9 in cppcheck()
    
    Please report this to the cppcheck developers!
    

    I'm using executing this command on Ubuntu Ubuntu 12.04 LTS 64bit with cppcheck 1.66. But I can produce the same error with 1.68 version.

    In windows, everything works as expected.

    Any suggestion about this?

    Thanks,
    Ali

     

    Last edit: Akdeniz 2015-04-06
  • Alexander Mai

    Alexander Mai - 2015-04-06

    In first place you might report the bug at http://trac.cppcheck.net/
    A short example to reproduce the error will help on analysis.
    Does it also crash without the -j16 argument?

     
  • Akdeniz

    Akdeniz - 2015-04-07

    Ok, I will report a bug with simplified example.

    And when I remove -j16 argument, I work as expected.
    The main difference with linux and windows versions is the way of handling threads, right? (afaik for linux, it does fork a process to provide parallelism).

    Can this be related to threading?

     
  • Alexander Mai

    Alexander Mai - 2015-04-11

    According to your results it sounds likely. OTOH there are some known issues about the template handling, so maybe that can't be ruled out.
    Did you submit your example already?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.