BoomerangDecompiler / boomerang

Boomerang Decompiler - Fighting the code-rot :)
Other
372 stars 59 forks source link

Compile error in SDL2Parser.cpp (still) #151

Closed powerbf closed 5 years ago

powerbf commented 5 years ago

OS: Linux Mint 19 Output of 'boomerang-cli --version' Unable to build, but "git log -n 1" gives: commit 0d9a18cc16dca49fccb4f5f5a636f7893a0ca878 (HEAD -> develop, origin/develop, origin/HEAD) Author: ceeac ceeac@users.noreply.github.com Date: Sun Dec 9 11:20:51 2018 +0100

Fix #148: Compile error in SSL2Parser.cpp (#149)

Steps to reproduce:

  1. rm -rf build
  2. mkdir build
  3. cd build
  4. cmake ..
  5. make

Expected/desired behaviour Build without error

Actual behaviour Fails with error: potential null pointer dereference

Additional comments

Thanks for the update ceeac, but it's still failing for me, even after blowing away my build directory and starting from scratch.

Cmake does give me the new warning about the Bison version, but it doesn't seem to have affected the flags passed to g++. (I also tried forcing cmake to use gcc instead of g++, but made no difference.)

Here is the relevant output from "make VERBOSE=1":

[ 0%] Building CXX object src/boomerang/ssl/parser/CMakeFiles/boomerang-ssl2-parser.dir/SSL2Parser.cpp.o cd /home/brian/workspace/github/boomerang/build/src/boomerang/ssl/parser && /usr/bin/ccache /usr/bin/g++ -DBCCTR_LONG=0 -DBOOMERANG_BIG_ENDIAN=0 -DBOOMERANG_BITNESS=64 -DBOOMERANG_VERSION=\"v0.4.0-alpha-205-g0d9a18cc\" -DCHECK_REAL_PHI_LOOPS=0 -DDEBUG=0 -DDEBUG_PARAMS=1 -DDEBUG_SIMP=0 -DDEBUG_SPLIT_FOR_BRANCH=0 -DNEW=0 -DPRINT_BACK_EDGES=0 -DPRINT_BBINDEX=0 -DPRINT_UNION=0 -DQT_CORE_LIB -DQT_NO_DEBUG -DRECURSION_WIP=0 -DSYMS_IN_BACK_END=0 -DV9_ONLY=0 -DYYMAXDEPTH=10000 -I/home/brian/workspace/github/boomerang/src -I/home/brian/workspace/github/boomerang/build/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -Wall -Wextra -Werror -Werror=pedantic -Wshadow -Wformat=2 -Wmissing-include-dirs -Wstrict-overflow=2 -Wnull-dereference -Wduplicated-cond -Wduplicated-branches -Walloc-zero -Walloca -Wsuggest-override -Wundef -Wno-unknown-pragmas -fno-strict-aliasing -Wno-error=strict-overflow -Wno-error=alloca -Wno-error=implicit-fallthrough -Wzero-as-null-pointer-constant -Wno-error=zero-as-null-pointer-constant -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++1z -o CMakeFiles/boomerang-ssl2-parser.dir/SSL2Parser.cpp.o -c /home/brian/workspace/github/boomerang/src/boomerang/ssl/parser/SSL2Parser.cpp /home/brian/workspace/github/boomerang/src/boomerang/ssl/parser/SSL2Parser.cpp: In member function ‘virtual std::__cxx11::string yy::parser::yysyntaxerror(yy::parser::state_type, const symbol_type&) const’: /home/brian/workspace/github/boomerang/src/boomerang/ssl/parser/SSL2Parser.cpp:2241:38: error: potential null pointer dereference [-Werror=null-dereference] for (char const yyp = yyformat; yyp; ++yyp) ^~~~ cc1plus: all warnings being treated as errors src/boomerang/ssl/parser/CMakeFiles/boomerang-ssl2-parser.dir/build.make:73: recipe for target 'src/boomerang/ssl/parser/CMakeFiles/boomerang-ssl2-parser.dir/SSL2Parser.cpp.o' failed make[2]: *** [src/boomerang/ssl/parser/CMakeFiles/boomerang-ssl2-parser.dir/SSL2Parser.cpp.o] Error 1

powerbf commented 5 years ago

Continuation of issue #148