When I bug hunting the dhcpc.c(https://github.com/RT-Thread/rt-thread/blob/stable-v3.0.x/components/net/uip/apps/dhcpc/dhcpc.c ), cppcheck got crashed:
$ cppcheck --platform=unix32 --bug-hunting components/net/uip/apps/dhcpc/dhcpc.c Checking components/net/uip/apps/dhcpc/dhcpc.c ... Segmentation fault (core dumped)
backtrace is:
#0 0x000055563d789ac9 in assignExprValue(Token const*, std::shared_ptr<ExprEngine::Value>, (anonymous namespace)::Data&) () #1 0x000055563d78a4f4 in executeAssign(Token const*, (anonymous namespace)::Data&) () #2 0x000055563d78352e in executeExpression1(Token const*, (anonymous namespace)::Data&) () #3 0x000055563d785824 in executeExpression(Token const*, (anonymous namespace)::Data&) () #4 0x000055563d7861fc in execute(Token const*, Token const*, (anonymous namespace)::Data&) () #5 0x000055563d78cd64 in ExprEngine::executeFunction(Scope const*, ErrorLogger*, Tokenizer const*, Settings const*, std::vector<std::function<void (Token const*, ExprEngine::Value const&, ExprEngine::DataBase*)>, std::allocator<std::function<void (Token const*, ExprEngine::Value const&, ExprEngine::DataBase*)> > > const&, std::ostream&) () #6 0x000055563d78dd1c in ExprEngine::executeAllFunctions(ErrorLogger*, Tokenizer const*, Settings const*, std::vector<std::function<void (Token const*, ExprEngine::Value const&, ExprEngine::DataBase*)>, std::allocator<std::function<void (Token const*, ExprEngine::Value const&, ExprEngine::DataBase*)> > > const&, std::ostream&) () #7 0x000055563d78df2c in ExprEngine::runChecks(ErrorLogger*, Tokenizer const*, Settings const*) () #8 0x000055563d7426fa in CppCheck::checkNormalTokens(Tokenizer const&) () #9 0x000055563d74a467 in CppCheck::checkFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::istream&) () #10 0x000055563d74c81f in CppCheck::check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () #11 0x000055563d6185ea in CppCheckExecutor::check_internal(CppCheck&, int, char const* const*) () #12 0x000055563d618afa in CppCheckExecutor::check(int, char const* const*) () #13 0x000055563d6010d2 in main ()
cppcheck is git version: 3a7ba3cd295550bb6e2903af6, build with:
cmake .. -DHAVE_RULES=ON -DUSE_MATCHCOMPILER=ON -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=ON -DUSE_Z3=ON
So what's the problem? If you need more information, feel free to contract me.
Thanks! I can reproduce. I created https://trac.cppcheck.net/ticket/10391
Log in to post a comment.
When I bug hunting the dhcpc.c(https://github.com/RT-Thread/rt-thread/blob/stable-v3.0.x/components/net/uip/apps/dhcpc/dhcpc.c ), cppcheck got crashed:
backtrace is:
cppcheck is git version: 3a7ba3cd295550bb6e2903af6, build with:
So what's the problem? If you need more information, feel free to contract me.
Thanks! I can reproduce. I created https://trac.cppcheck.net/ticket/10391