projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b07ca87
)
Fix null pointer dereference after failing to extract DFF from memory.
author
Catherine
<whitequark@whitequark.org>
Tue, 14 Dec 2021 16:27:37 +0000
(16:27 +0000)
committer
Catherine
<whitequark@whitequark.org>
Tue, 14 Dec 2021 16:27:37 +0000
(16:27 +0000)
Fixes #3110.
kernel/mem.cc
patch
|
blob
|
history
diff --git
a/kernel/mem.cc
b/kernel/mem.cc
index 746f667ea77f6333d3edec14c127a0ef88768718..96168ff76b3949aae086b7c8f353a1bd471197ff 100644
(file)
--- a/
kernel/mem.cc
+++ b/
kernel/mem.cc
@@
-985,7
+985,8
@@
Cell *Mem::extract_rdff(int idx, FfInitVals *initvals) {
c = ff.emit();
}
- log("Extracted %s FF from read port %d of %s.%s: %s\n", trans_use_addr ? "addr" : "data",
+ if (c)
+ log("Extracted %s FF from read port %d of %s.%s: %s\n", trans_use_addr ? "addr" : "data",
idx, log_id(module), log_id(memid), log_id(c));
port.en = State::S1;