diff --git a/librz/core/cmd_analysis.c b/librz/core/cmd_analysis.c index a51199e99a3..c72c600ed73 100644 --- a/librz/core/cmd_analysis.c +++ b/librz/core/cmd_analysis.c @@ -857,12 +857,14 @@ static bool cmd_analysis_aaft(RzCore *core) { RzListIter *it; RzAnalysisFunction *fcn; ut64 seek; - const char *io_cache_key = "io.pcache.write"; - bool io_cache = rz_config_get_i(core->config, io_cache_key); if (rz_config_get_i(core->config, "cfg.debug")) { eprintf("TOFIX: aaft can't run in debugger mode.\n"); return false; } + const char *io_cache_key = "io.pcache.write"; + RzConfigHold *hold = rz_config_hold_new(core->config); + rz_config_hold_i(hold, "io.va", io_cache_key, NULL); + bool io_cache = rz_config_get_i(core->config, io_cache_key); if (!io_cache) { // XXX. we shouldnt need this, but it breaks 'rizin -c aaa -w ls' rz_config_set_i(core->config, io_cache_key, true); @@ -888,7 +890,7 @@ static bool cmd_analysis_aaft(RzCore *core) { } rz_core_seek(core, seek, true); rz_reg_arena_pop(core->analysis->reg); - rz_config_set_i(core->config, io_cache_key, io_cache); + rz_config_hold_restore(hold); free(saved_arena); return true; } diff --git a/test/db/cmd/types b/test/db/cmd/types index 7cd0c59a341..2d902f701ab 100644 --- a/test/db/cmd/types +++ b/test/db/cmd/types @@ -1241,6 +1241,19 @@ var int64_t canary @ rbp-0x8 EOF RUN +NAME=aaft io.va side effect +FILE=- +ARGS=-eio.va=0 -a x86 -b 64 +CMDS=<