From 3c98129957e077b557c1348d7ae49270d7b8037c Mon Sep 17 00:00:00 2001 From: reuk Date: Fri, 28 Apr 2017 14:49:58 +0100 Subject: [PATCH] Fix return of temporary ref in ssa_exprt This patch fixes an issue where ssa_exprt::get_object_name returns a const reference to an object with stack-bound lifetime. --- src/util/ssa_expr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ssa_expr.h b/src/util/ssa_expr.h index 446e82169d6..36e5a946ea7 100644 --- a/src/util/ssa_expr.h +++ b/src/util/ssa_expr.h @@ -42,7 +42,7 @@ class ssa_exprt:public symbol_exprt return static_cast(find(ID_expression)); } - const irep_idt &get_object_name() const + irep_idt get_object_name() const { object_descriptor_exprt ode; ode.object()=get_original_expr();