diff options
| author | Drahflow <drahflow@gmx.de> | 2015-07-01 22:43:21 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2015-07-01 22:43:21 +0200 |
| commit | 6ffad6c1458ed20eccdb7c7079d9747bd1bccaa3 (patch) | |
| tree | 1e45a7b800831a2e526d328f02be225ada8ae103 | |
| parent | 5b5a4728810fa3fd4e40fafc397e4a7f610f1675 (diff) | |
Wrap ffi-returned strings without crashing
Apparently internalAllocate now (as is permitted) modifies
rcx. The buggy code was not prepared to deal with it.
| -rw-r--r-- | elymas/lib/sys/so.ey | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/elymas/lib/sys/so.ey b/elymas/lib/sys/so.ey index 5c65ccf..029d446 100644 --- a/elymas/lib/sys/so.ey +++ b/elymas/lib/sys/so.ey @@ -204,9 +204,11 @@ :repnz :scasb /rcx :negqReg 2 /rcx :subqImm8Reg + /rcx :pushqReg /rcx /rdi :movqRegReg ::internalAllocateString /rax :movqImmReg /rax :callqReg + /rcx :popqReg /rsi :popqReg /rax :pushqReg 24 /rax /rdi :leaqMemDisp8Reg |
