projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e9ef89
)
Fix segfault on failed VERILOG_FRONTEND::const2ast, closes #1131
author
Clifford Wolf
<clifford@clifford.at>
Wed, 26 Jun 2019 09:09:43 +0000
(11:09 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Wed, 26 Jun 2019 09:09:43 +0000
(11:09 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/verilog/const2ast.cc
patch
|
blob
|
history
diff --git
a/frontends/verilog/const2ast.cc
b/frontends/verilog/const2ast.cc
index 3a3634d34a09c1a660c79053235b945f57cb735c..f6a17b2427b95902ef072e279c0324ed02a692c9 100644
(file)
--- a/
frontends/verilog/const2ast.cc
+++ b/
frontends/verilog/const2ast.cc
@@
-153,7
+153,7
@@
AstNode *VERILOG_FRONTEND::const2ast(std::string code, char case_type, bool warn
{
if (warn_z) {
AstNode *ret = const2ast(code, case_type);
- if (std::find(ret->bits.begin(), ret->bits.end(), RTLIL::State::Sz) != ret->bits.end())
+ if (
ret != nullptr &&
std::find(ret->bits.begin(), ret->bits.end(), RTLIL::State::Sz) != ret->bits.end())
log_warning("Yosys has only limited support for tri-state logic at the moment. (%s:%d)\n",
current_filename.c_str(), get_line_num());
return ret;