From 9a14ce0870f5a3e2ac0db50497bfb6eb57378512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Sat, 21 Feb 2026 22:25:48 +0100 Subject: [PATCH] Fix null deref in findClkDelays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was observed to cause crashes in write_timing_model. Signed-off-by: Martin PoviĊĦer --- search/ClkLatency.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search/ClkLatency.cc b/search/ClkLatency.cc index 5fc244e8..dfed67d6 100644 --- a/search/ClkLatency.cc +++ b/search/ClkLatency.cc @@ -164,10 +164,10 @@ ClkLatency::findClkDelays(ConstClockSeq &clks, Path *path = path_iter.next(); const ClockEdge *path_clk_edge = path->clkEdge(this); const Scene *path_scene = path->scene(this); - const Clock *path_clk = path_clk_edge->clock(); if (path_clk_edge && scenes.contains(path_scene) - && clk_set.contains(path_clk)) { + && clk_set.contains(path_clk_edge->clock())) { + const Clock *path_clk = path_clk_edge->clock(); auto delays_itr = clk_delay_map.find(path_clk); if (delays_itr != clk_delay_map.end()) { ClkDelays &clk_delays = delays_itr->second;