verilog-to-routing / libsdcparse

MIT License
11 stars 6 forks source link

Potential null-dereference in libsdcparse/sdc_parser.gen.cpp #1

Open mithro opened 5 years ago

mithro commented 5 years ago

See the following error;

/home/tansell/github/verilog-to-routing/vtr-verilog-to-routing/build/libs/EXTERNAL/libsdcparse/sdc_parser.gen.cpp: In member function ‘yysyntax_error_’:
/home/tansell/github/verilog-to-routing/vtr-verilog-to-routing/build/libs/EXTERNAL/libsdcparse/sdc_parser.gen.cpp:1716:38: warning: potential null pointer dereference [-Wnull-dereference]
     for (char const* yyp = yyformat; *yyp; ++yyp)
mithro commented 5 years ago

Could just disable the null-pointer checking on this generated file; https://github.com/BoomerangDecompiler/boomerang/commit/a56379e246dd509b9fda5d27f1bbf8b5a9e8741f#diff-b985ec8686a5094f11513d1330562a05R56

mithro commented 5 years ago
if (CMAKE_COMPILER_IS_GNUCXX AND BISON_VERSION VERSION_LESS 3.0.5)
    # Grammars generated by Bison 3.0.4 and below emit a null pointer dereference warning
    # when compiled with GCC 7
    set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/SSL2Parser.cpp
        PROPERTIES COMPILE_FLAGS -Wno-error=null-dereference)
endif ()