From df6ff68a0566bb75a021d50ac05cc4e8e6da67d8 Mon Sep 17 00:00:00 2001 From: wargio Date: Thu, 28 Dec 2023 21:56:29 +0800 Subject: [PATCH 1/5] Fix dev build --- rizin | 2 +- src/core/Cutter.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rizin b/rizin index 286d9bd87..987aee088 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit 286d9bd874bfbe1e782cba901e59984d708d10af +Subproject commit 987aee0883ee5341a8977bc2598f689d2645eca8 diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 43ba9bab3..260d5cb28 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -722,7 +722,7 @@ PRzAnalysisBytes CutterCore::getRzAnalysisBytesSingle(RVA addr) rz_io_read_at(core->io, addr, buf, sizeof(buf)); auto seek = seekTemp(addr); - auto vec = fromOwned(rz_core_analysis_bytes(core, buf, sizeof(buf), 1)); + auto vec = fromOwned(rz_core_analysis_bytes(core, addr, buf, sizeof(buf), 1)); auto ab = vec && rz_pvector_len(vec.get()) > 0 ? reinterpret_cast(rz_pvector_pop_front(vec.get())) @@ -1028,7 +1028,7 @@ RVA CutterCore::nextOpAddr(RVA startAddr, int count) CORE_LOCK(); auto seek = seekTemp(startAddr); auto vec = - fromOwned(rz_core_analysis_bytes(core, core->block, (int)core->blocksize, count + 1)); + fromOwned(rz_core_analysis_bytes(core, startAddr, core->block, (int)core->blocksize, count + 1)); RVA addr = startAddr + 1; if (!vec) { @@ -1666,7 +1666,7 @@ QVector CutterCore::getHeapChunks(RVA arena_addr) rz_list_free(arenas); return chunks_vector; } - m_arena = ((RzArenaListItem *)arenas->head->elem)->addr; + m_arena = ((RzArenaListItem *)rz_list_get_head_data(arenas))->addr; rz_list_free(arenas); } else { m_arena = arena_addr; From 97fb26e75402389ddce0beac48f2b733d83dd59c Mon Sep 17 00:00:00 2001 From: wargio Date: Thu, 28 Dec 2023 22:55:37 +0800 Subject: [PATCH 2/5] Fix deadlock --- src/core/Cutter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 260d5cb28..a8e72c2e4 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -2793,7 +2793,7 @@ int CutterCore::breakpointIndexAt(RVA addr) BreakpointDescription CutterCore::getBreakpointAt(RVA addr) { CORE_LOCK(); - int index = breakpointIndexAt(addr); + int index = rz_bp_get_index_at(core->dbg->bp, addr); auto bp = rz_bp_get_index(core->dbg->bp, index); if (bp) { return breakpointDescriptionFromRizin(index, bp); From b86a0d92afa9a76d41f02857cca35b778ddf40a5 Mon Sep 17 00:00:00 2001 From: wargio Date: Thu, 28 Dec 2023 23:58:19 +0800 Subject: [PATCH 3/5] Fix wrong offset --- src/core/Cutter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index a8e72c2e4..a008e06fb 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -1028,7 +1028,7 @@ RVA CutterCore::nextOpAddr(RVA startAddr, int count) CORE_LOCK(); auto seek = seekTemp(startAddr); auto vec = - fromOwned(rz_core_analysis_bytes(core, startAddr, core->block, (int)core->blocksize, count + 1)); + fromOwned(rz_core_analysis_bytes(core, core->offset, core->block, (int)core->blocksize, count + 1)); RVA addr = startAddr + 1; if (!vec) { From 88a658c29918cb0dab647d8e0f23c8d102ccd7a8 Mon Sep 17 00:00:00 2001 From: wargio Date: Fri, 29 Dec 2023 10:40:51 +0800 Subject: [PATCH 4/5] Fix formatting --- src/core/Cutter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index a008e06fb..be3f8f7ad 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -1027,8 +1027,8 @@ RVA CutterCore::nextOpAddr(RVA startAddr, int count) { CORE_LOCK(); auto seek = seekTemp(startAddr); - auto vec = - fromOwned(rz_core_analysis_bytes(core, core->offset, core->block, (int)core->blocksize, count + 1)); + auto vec = fromOwned(rz_core_analysis_bytes(core, core->offset, core->block, + (int)core->blocksize, count + 1)); RVA addr = startAddr + 1; if (!vec) { From 93bfc5cab59fd80487df9cda8f7f13a29becc5ea Mon Sep 17 00:00:00 2001 From: wargio Date: Fri, 29 Dec 2023 14:33:43 +0800 Subject: [PATCH 5/5] Update rizin & translations --- rizin | 2 +- src/translations | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rizin b/rizin index 987aee088..ccbfe57b6 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit 987aee0883ee5341a8977bc2598f689d2645eca8 +Subproject commit ccbfe57b683f247f9b73835a1c46f50627ba4edd diff --git a/src/translations b/src/translations index 10528baf7..30267d0ac 160000 --- a/src/translations +++ b/src/translations @@ -1 +1 @@ -Subproject commit 10528baf7920bfa39c5aeb06a433e4d60814e53f +Subproject commit 30267d0acd528cbdbe2911e562085f7385e5ac47