From e780935af7cbef9a49e208cf9200b7149b8c3ff1 Mon Sep 17 00:00:00 2001 From: mszelwiga Date: Fri, 22 Nov 2024 16:28:18 +0100 Subject: [PATCH] Add check for nullptr dereference in process_port --- src/frontends/systemverilog/uhdm_ast.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontends/systemverilog/uhdm_ast.cc b/src/frontends/systemverilog/uhdm_ast.cc index ed04cb736..c93b46e16 100644 --- a/src/frontends/systemverilog/uhdm_ast.cc +++ b/src/frontends/systemverilog/uhdm_ast.cc @@ -4997,6 +4997,8 @@ void UhdmAst::process_port() std::vector unpacked_ranges; // comes after wire name if (lowConn_h) { vpiHandle actual_h = vpi_handle(vpiActual, lowConn_h); + if (!actual_h) + log_error("vpiPort doesn't contain vpiActual in it's subtree. Aborting.\n"); auto actual_type = vpi_get(vpiType, actual_h); switch (actual_type) { case vpiModport: {