Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mithro opened this issue Jun 4, 2019 · 2 comments · May be fixed by #2
Open

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

mithro opened this issue Jun 4, 2019 · 2 comments · May be fixed by #2

Comments

@mithro
Copy link

mithro commented Jun 4, 2019

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
Copy link
Author

mithro commented Jun 4, 2019

Could just disable the null-pointer checking on this generated file;
BoomerangDecompiler/boomerang@a56379e#diff-b985ec8686a5094f11513d1330562a05R56

@mithro
Copy link
Author

mithro commented Jun 4, 2019

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 ()

@mithro mithro linked a pull request Jun 4, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant