mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-15 14:11:29 +00:00
Merge pull request #5334 from jix/fix-memory_libmap-ubsan
memory_libmap: Fix use of uninitialized value for async read ports
This commit is contained in:
commit
931089c1c9
1 changed files with 3 additions and 1 deletions
|
@ -855,7 +855,9 @@ struct Parser {
|
||||||
PortVariant var;
|
PortVariant var;
|
||||||
var.options = portopts;
|
var.options = portopts;
|
||||||
var.kind = pdef.kind;
|
var.kind = pdef.kind;
|
||||||
if (pdef.kind != PortKind::Ar) {
|
if (pdef.kind == PortKind::Ar) {
|
||||||
|
var.clk_en = false;
|
||||||
|
} else {
|
||||||
const ClockDef *cdef = find_single_cap(pdef.clock, cram.options, portopts, "clock");
|
const ClockDef *cdef = find_single_cap(pdef.clock, cram.options, portopts, "clock");
|
||||||
if (!cdef)
|
if (!cdef)
|
||||||
log_error("%s:%d: missing clock capability.\n", filename.c_str(), orig_line);
|
log_error("%s:%d: missing clock capability.\n", filename.c_str(), orig_line);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue