From d66aa40664fb365bc3a2e5191fb7239c5a78eb61 Mon Sep 17 00:00:00 2001 From: Alessandro Di Federico Date: Wed, 3 Jun 2026 17:42:48 +0200 Subject: [PATCH] model override-by-name: skip nameless base functions `base_function["Name"]` crashes with `KeyError` when the model has a function without an explicit `Name` (e.g. the binary entry stub). Skip those entries silently; only named functions can be matched by name anyway. --- python/revng/internal/cli/_commands/override_by_name.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/revng/internal/cli/_commands/override_by_name.py b/python/revng/internal/cli/_commands/override_by_name.py index 082d847d4..77a356cf2 100644 --- a/python/revng/internal/cli/_commands/override_by_name.py +++ b/python/revng/internal/cli/_commands/override_by_name.py @@ -87,6 +87,8 @@ class ModelOverrideByName(Command): return 1 for base_function in base_model["Functions"]: + if "Name" not in base_function: + continue if base_function["Name"] == function_name: function_to_override["Entry"] = base_function["Entry"] function_to_override["Name"] = base_function["Name"]