From 9fddeb8d65f74cfefe91546c2726584a0e5252f9 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Mon, 6 Jul 2020 15:15:53 -0400 Subject: [PATCH] i#1684 xarch-IR: Fix drwrap host!=target undef sym (#4359) Fixes an undefined symbol in drwrap when host!=target. Only some compilers complain about it. Issue: #1684 --- ext/drwrap/drwrap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/drwrap/drwrap.c b/ext/drwrap/drwrap.c index e7f941bee70..9d45af1faa3 100644 --- a/ext/drwrap/drwrap.c +++ b/ext/drwrap/drwrap.c @@ -1624,7 +1624,10 @@ drwrap_replace_native_fini(void *drcontext) */ volatile app_pc app_retaddr; byte *xsp = (byte *)dr_read_saved_reg(drcontext, DRWRAP_REPLACE_NATIVE_SP_SLOT); -#ifdef AARCHXX +#ifdef DR_HOST_NOT_TARGET + byte *cur_xsp = NULL; + ASSERT(false, "cross-arch execution is not supported"); +#elif defined(AARCHXX) byte *cur_xsp = get_cur_xsp(); #endif ASSERT(xsp != NULL, "did client clobber TLS slot?");