Comments (4)
What is missing is the recalculation of relative jumps, dependent on the size of the new ASM_MOV_EBP, 5 or 2.
from potion.
Latest udis86 has the signed mem offset problem for offset sizes>1byte fixed.
BTW: the needed udis86 fix for 1.7 was
diff --git a/libudis86/syn-att.c b/libudis86/syn-att.c
index 7a7fc7c..f8d703e 100644
--- a/libudis86/syn-att.c
+++ b/libudis86/syn-att.c
@@ -64,10 +64,16 @@ gen_operand(struct ud* u, struct ud_operand* op)
mkasm(u, "-0x%x", (-op->lval.sbyte) & 0xff);
else mkasm(u, "0x%x", op->lval.sbyte);
}
- else if (op->offset == 16)
- mkasm(u, "0x%x", op->lval.uword);
- else if (op->offset == 32)
- mkasm(u, "0x%lx", op->lval.udword);
+ else if (op->offset == 16) {
+ if (op->lval.sword < 0) /* rurban: large negative offsets */
+ mkasm(u, "-0x%x", (-op->lval.sword) & 0xffff);
+ else mkasm(u, "0x%x", op->lval.sword);
+ }
+ else if (op->offset == 32) {
+ if (op->lval.sdword < 0) /* rurban: large negative offsets */
+ mkasm(u, "-0x%lx", (-op->lval.sdword) & 0xffff);
+ else mkasm(u, "0x%lx", op->lval.udword);
+ }
else if (op->offset == 64)
mkasm(u, "0x" FMT64 "x", op->lval.uqword);
from potion.
And this patch improves gdb readbility: https://sourceware.org/ml/gdb-patches/2013-10/msg00393.html
from potion.
There are 3 more cases of such possible overflows (15: 64bit, 31: 32bit)
- potion_x86_upvals: upc > 15
- potion_x86_method: (lregs + opp.b) > 15/31 and upc > 15/31
from potion.
Related Issues (20)
- Problem with potion installation HOT 2
- Make fails HOT 4
- Migrate LGTM.com installation from OAuth to GitHub App
- Make fails HOT 1
- 1 out of 282 tests failed HOT 3
- Unable to build with the new -D_FORTIFY_SOURCE=2 HOT 3
- When building under vagrant/precise32, build succeeds but some tests, examples fail HOT 3
- test/tutorial/07_subclass.pn is failing on master HOT 4
- wrong x-1 parsing precedence, whitespace
- numeric compare in wrong integer context HOT 2
- change numcmp for eq and neq
- call on nil segfaults HOT 7
- call on nil methods silently fail HOT 3
- Installation issue HOT 4
- callset on nil segfaults HOT 2
- fatal: Not a git repository (or any of the parent directories): .git HOT 1
- compile: unknown builtin '__builtin_saddl_overflow' HOT 4
- More segmentation faults HOT 7
- Comparison between String and number does not work as expected HOT 1
- replace mersenne twister by pcg
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 potion.