Comments (4)
This is the commit I did to fix the segfault:
$ git format-patch HEAD^
0001-Fix-MIPS-disassembler-segfault.patch
$ xz < 0001-Fix-MIPS-disassembler-segfault.patch |base64
/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4AJLAaZdACMcieb23x44dHxFiPxaejNzD3JoPccbVwwO1tEqGGpv0ZXF0HhzcXz1AtvC3TUXZ2Fvl0JlIe7XbH1aAwdidz9eJ00/C5BAqOXVGi48GEQhprL9KGXDqnNjeqINlIWnwG3RW/imyMyrNCaM3ALiq0ZK19XRPP3Ubsrtr4mBbrB9GQL51cKSWhTxDAJoRwLCg5ZrDV+s8tPowXN5CWnK/Lbg4p9/2ggZwbehvNG+f8tqPu7EINs1GTzTkXWmcc5g41ndxCObVW6BCSgs8usdbWNpFAAJzXd+Ze2OzmxYiC6AVFNh82HSq+MxnL901aZ11/Y135ny7nvJYZtUIsVM13m/8U4+Tc3sJOujOa7BlDaMBs2wYOATspr13XgFYv6mIgXVIbTT+niT5Q7UdHG5ZG3Kb6CtStuDMJw2IEOSat+jBcQhVwwNnRWEMHRUNCwBAt4VU9MGCIVwQ5FCi3dAnl/DhRfsi/d1JdFaLou88ccHZPm9IkPTryt6s2s109mWcNva8FhoP+oY2UIg4tscrMwVcTX4N4/WetaJe9DaWdPvjXJg55GKAAAASTTAY6YLP3IAAcIDzAQAANDoR+OxxGf7AgAAAAAEWVo=
$ cat 0001-Fix-MIPS-disassembler-segfault.patch
From 53d23c94ce3062a265e2d11fb222550fd544f481 Mon Sep 17 00:00:00 2001
From: pancake <[email protected]>
Date: Fri, 6 Dec 2013 03:55:14 +0100
Subject: [PATCH] Fix MIPS disassembler segfault
---
utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/utils.c b/utils.c
index 539ab14..3f9e968 100644
--- a/utils.c
+++ b/utils.c
@@ -27,6 +27,8 @@ int insn_find(insn_map *m, unsigned int max, unsigned int id)
while(begin <= end) {
i = (begin + end) / 2;
+ if (i>=max)
+ return -1;
if (id == m[i].id)
return i;
else if (id < m[i].id)
--
1.8.3.4 (Apple Git-47)
from capstone.
Pancake, please could you provide the Mips code + arch + mode triggering
this crash, so i can verify if the root cause of the problem?
thanks,
Q
On Fri, Dec 6, 2013 at 10:57 AM, radare [email protected] wrote:
This is the commit I did to fix the segfault:
$ cat 0001-Fix-MIPS-disassembler-segfault.patch
From 53d23c94ce3062a265e2d11fb222550fd544f481 Mon Sep 17 00:00:00 2001
From: pancake [email protected]
Date: Fri, 6 Dec 2013 03:55:14 +0100
Subject: [PATCH] Fix MIPS disassembler segfault
utils.c | 2 ++
1 file changed, 2 insertions(+)diff --git a/utils.c b/utils.c
index 539ab14..3f9e968 100644
--- a/utils.c
+++ b/utils.c
@@ -27,6 +27,8 @@ int insn_find(insn_map *m, unsigned int max, unsigned int id)while(begin <= end) { i = (begin + end) / 2;
if (i>=max)
--return -1; if (id == m[i].id) return i; else if (id < m[i].id)
1.8.3.4 (Apple Git-47)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-29959903
.
from capstone.
It's already in the description of the bug. See the rasm2 hexpairs
On 06 Dec 2013, at 04:59, Nguyen Anh Quynh [email protected] wrote:
Pancake, please could you provide the Mips code + arch + mode triggering
this crash, so i can verify if the root cause of the problem?thanks,
QOn Fri, Dec 6, 2013 at 10:57 AM, radare [email protected] wrote:
This is the commit I did to fix the segfault:
$ cat 0001-Fix-MIPS-disassembler-segfault.patch
From 53d23c94ce3062a265e2d11fb222550fd544f481 Mon Sep 17 00:00:00 2001
From: pancake [email protected]
Date: Fri, 6 Dec 2013 03:55:14 +0100
Subject: [PATCH] Fix MIPS disassembler segfault
utils.c | 2 ++
1 file changed, 2 insertions(+)diff --git a/utils.c b/utils.c
index 539ab14..3f9e968 100644
--- a/utils.c
+++ b/utils.c
@@ -27,6 +27,8 @@ int insn_find(insn_map *m, unsigned int max, unsigned int id)while(begin <= end) {
i = (begin + end) / 2;
- if (i>=max)
return -1;
1.8.3.4 (Apple Git-47)
if (id == m[i].id)
return i;
else if (id < m[i].id)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-29959903
.—
Reply to this email directly or view it on GitHub.
from capstone.
Please review/apply this patch before release
from capstone.
Related Issues (20)
- MacOS wheel only contains x86_64 version of the libcapstone.dylib despite the package claims to be universal HOT 1
- Got abnormal behavior when set CS_OPT_DETAIL_REAL without CS_OPT_ON
- Can capstone recognize fmv.w.x instruction in RISCV ? HOT 3
- HPPADisassembler.c unitialized variables
- Incorrect/Missing Python Binding for operands within the X86-64 STOS Instruction
- Ensure API is properly documented before `v6`
- Use proper versioning on CMakeLists.txt - pkgconf versions are wrong otherwise HOT 1
- [BPF] `bpf_insn` collides with `libbpf` definition. HOT 13
- Build failure on Windows with MSVC \ capstone_static.vcxproj HOT 4
- HPPADisassembler: more unitialized variables HOT 3
- cs_insn::id is always invalid value on aarch64 HOT 2
- pip install on Mac HOT 1
- skipdata doesn't work correctly from python HOT 4
- Ability to Generate Bitmasks for Specific Instruction Components? HOT 3
- x64 disassembler big endian bug
- Compiler warnings in the next branch HOT 2
- python bindings depends on setuptools HOT 4
- Remove python2 leftovers
- [AArch64] Instr. with groups `HasNEON`, don't have `HasNEONorSME` and similar assigned. HOT 25
- Release v4.0.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capstone.