galoisinc / reopt Goto Github PK
View Code? Open in Web Editor NEWA tool for analyzing x86-64 binaries.
License: BSD 3-Clause "New" or "Revised" License
A tool for analyzing x86-64 binaries.
License: BSD 3-Clause "New" or "Revised" License
The definition of addMemWrite in Data.Macaw.AbsDomain.AbsState will clear the stack at offsets where it knows that a user has written to the stack. However, it does not clear the stack information at arbitrary writes.
We should determine how much stack information is really needed in code discovery, and see if we can remove the stack information or significantly simplify it rather than track information imprecisely.
Build errors:
In order, the following will be built (use -v for more details):
parameterized-utils-1.0.8
macaw-base-0.3.4
macaw-x86-0.0.1
reopt-0.1.0
Preprocessing library parameterized-utils-1.0.8...
[12 of 27] Compiling Data.Parameterized.NatRepr ( src/Data/Parameterized/NatRepr.hs, /home/sdasgup3/Github/reopt/dist-newstyle/build/parameterized-utils-1.0.8/build/Data/Parameterized/NatRepr.o )
src/Data/Parameterized/NatRepr.hs:138:1: error:
Failed to load interface for ‘GHC.TypeNats’
Perhaps you meant
GHC.TypeLits (from base-4.9.1.0)
GHC.Types (from ghc-prim-0.5.0.0)
Use -v to see a list of the files searched for.
Tools versions are:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.2
$ cabal --version
cabal-install version 1.24.0.1
compiled using version 1.24.1.0 of the Cabal library
Example in dmesg
function reopt_0_0x4041a0
:
define void @reopt_0_0x4041a0({ i8, i8, i8, i8 }* %arg0, { <0 x i8>, i8 }* %arg1, i64 %arg2) {
If you take this simple C program:
int main(void) {
return 0;
}
And produce a statically linked binary using musl-gcc
(obtained from here):
$ musl-gcc -static test.c -o test.exe
Then if I run reopt
on it like so:
$ cabal run exe:reopt -- --header scratch/shed.h test.exe -o test.exe.exe
It eventually fails with:
opt: <stdin>:45:30: error: '@__libc_start_main' defined with type 'void (i64, i64, i64)*' but expected 'void (i64, i64, {}*)*'
call void (i64, i64, { }*) @__libc_start_main(i64 4198713, i64 %t1, { }* %t3)
Currently, the first argument to printf
is a 64-bit bitvector. It would be ideal if this was mapped to a string literal as in LLVM.
For reference, we include one example program below and it's corresponding LLVM output:
#include<stdio.h>
void foo() {
printf("Hello World\n");
}
This compiles to:
@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @foo() #0 {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
The C standard includes rules about when floating point functions are allowed to modify floating point state, and when one may read floating point status registers. See FENV_ACCESS
and FENV_ROUND
in http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2346.pdf
We should inspect these rules, and ensure we generate legal LLVM when we access floating point status/control registers.
Example in curl
block block_0_407600
:
; r2
%t0 = phi { }* [ 4278216, %block_0_4075f0 ], [ %t4, %block_0_407609 ]
Example in date
block block_0_402be0
:
%t1 = icmp eq i64 %t0, 0
Example the other way around in column
block block_0_402760
:
%t0 = icmp eq { i8, i8 }* %arg0, 0
reopt currently does not build with GHC 7.10. For compatibiity with other projects this would be useful.
git submodules grabs macaw-base-0.0.1, but the cabal file requires macaw-base-0.0.2
I checked out master for all the submodules, more of the code builds, but
LoadOptions in Data.Macaw.Memory.LoadCommon has changed field names, it's no longer loadStyle, but now loadStyleOverride.
I suspect there's a commit missing from the top level repo.
When relinking, sections like .rodata.cst16 are copied from the source to the binary unchanged. We should parse symbol and relocation information to determine which parts are needed, and generate a single .rodata with only the required information.
Platform info:
pag@ubuntu:~/reopt$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
pag@ubuntu:~/reopt$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
pag@ubuntu:~/reopt$ uname -a
Linux ubuntu 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
pag@ubuntu:~/reopt$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
Error:
[ 7 of 18] Compiling Reopt.CFG.LLVM.X86 ( src/Reopt/CFG/LLVM/X86.hs, /home/pag/reopt/dist-newstyle/build/reopt-0.1.0/build/Reopt/CFG/LLVM/X86.o )
src/Reopt/CFG/LLVM/X86.hs:224:5: error:
Not in scope: data constructor ‘RepMovs’
|
224 | RepMovs bytesPerCopy destExpr srcExpr cntExpr dirExpr -> do
| ^^^^^^^
src/Reopt/CFG/LLVM/X86.hs:245:5: error:
Not in scope: data constructor ‘RepStos’
|
245 | RepStos bytesPerCopy destExpr srcExpr cntExpr dirExpr -> do
| ^^^^^^^
Example in addr2line
block block_0_4038f0
:
; r0 := (read arg0 (bv 8))
%t0 = load { i8, i8, i8, i8, i8 }, { i8, i8, i8, i8, i8 }* %arg0
; r1 := (uext r0 64)
%t1 = zext i8 %t0 to i64
Example in ar
block block_0_403590
:
; r0 := (0x60e6a0 : bv 64)
; r1 := (read r0 (bv 64))
%t0 = load i8*, i8** 6350496
I had the following header:
uid_t getuid(void);
and reopt would fail to understand arguments for calls to getuid
. Switching to:
uid_t getuid();
fixed it.
I assume it's because our header parser considers the initial signature as if it takes one argument.
I'm currently running into build failures with posix-waitpid on OSX. Is there any objection to making reopt_test optional? Specifically, changing "executable reopt_test" to "test-suite reopt_test"?
We now generate types that contain commas, e.g. { i64, i64 }
.
In the absence of quoting, these confuse the CSV output into thinking there are more columns.
reopt
depends on what4
as a submodule, but as far as I can tell, it does not actually use what4
for anything. If that is indeed the case, then we should consider removing the what4
submodule, as it will influence cabal
's build plan logic.
$ docker run -it galoisbinaryanalysis/reopt
root@56d894b61629:~# reopt -o ls.exe $(which ls)
Could not determine gdb's debug-file-directory:
debug directory reported by gdb does not exist: /usr/lib/debug
Initialization
Complete.
Searching for dynamic dependency libselinux.so.1's debug info...
No debug info for libselinux.so.1 found.
Searching for dynamic dependency libc.so.6's debug info...
No debug info for libc.so.6 found.
Header Processing
Complete.
Discovering 0x4da0
Complete.
Discovering 0x4da5
Complete.
Discovering 0x4daa
Complete.
Discovering 0x4daf
Complete.
Discovering 0x4db4
Complete.
Discovering 0x4db9
Complete.
Discovering 0x4dbe
Complete.
Discovering 0x4dc3
Complete.
Discovering 0x4dc8
Complete.
Discovering 0x4dcd
Complete.
Discovering 0x4dd2
Complete.
Discovering 0x4dd7
Complete.
Discovering 0x4ddc
Complete.
Discovering 0x4de1
Complete.
Discovering 0x4de6
Complete.
Discovering 0x4deb
Complete.
Discovering 0x4df0
Block 0x507a: segment1+0x5081: Could not decode instruction 3effe0
Block 0x5cdd: Unclassified control flow transfer.
Incomplete.
Discovering 0x67d0
Complete.
Discovering 0x68c0
Complete.
Discovering 0x68d0
Complete.
Discovering 0x68f0
Complete.
Discovering 0x6910
Block 0x6976: segment1+0x6981: Could not decode instruction 3e41ffe0
Incomplete.
Discovering 0x6b30
Complete.
Discovering 0x6b40
Complete.
Discovering 0x6bb0
Complete.
Discovering 0x6c30
Complete.
Discovering 0x6e80
Complete.
Discovering 0x6ef0
Complete.
Discovering 0x6f00
Complete.
Discovering 0x6f20
Complete.
Discovering 0x6f70
Complete.
Discovering 0x7020
Complete.
Discovering 0x70a0
Block 0x7278: Unclassified control flow transfer.
Block 0x7322: Unclassified control flow transfer.
Incomplete.
Discovering 0x7180
Block 0x7322: Unclassified control flow transfer.
Incomplete.
Discovering 0x7310
Complete.
Discovering 0x7340
Complete.
Discovering 0x7350
Complete.
Discovering 0x7360
Complete.
Discovering 0x7380
Complete.
Discovering 0x7390
Complete.
Discovering 0x7520
Complete.
Discovering 0x75f0
Complete.
Discovering 0x76c0
Complete.
Discovering 0x7780
Complete.
Discovering 0x77d0
Complete.
Discovering 0x77f0
Complete.
Discovering 0x7860
Complete.
Discovering 0x78a0
Complete.
Discovering 0x7900
Complete.
Discovering 0x7960
Complete.
Discovering 0x79d0
Complete.
Discovering 0x7a40
Complete.
Discovering 0x7b30
Complete.
Discovering 0x7b80
Complete.
Discovering 0x7c00
Complete.
Discovering 0x7c70
Complete.
Discovering 0x7cd0
Complete.
Discovering 0x7dc0
Complete.
Discovering 0x7f90
Complete.
Discovering 0x7ff0
Complete.
Discovering 0x8060
Complete.
Discovering 0x8090
Complete.
Discovering 0x8170
Complete.
Discovering 0x81e0
Complete.
Discovering 0x8650
Complete.
Discovering 0x8a60
Complete.
Discovering 0x8eb0
Complete.
Discovering 0x9050
Block 0x9530: Unclassified control flow transfer.
Incomplete.
Discovering 0x9ab0
Complete.
Discovering 0x9b50
Complete.
Discovering 0x9d00
Block 0xa119: Unclassified control flow transfer.
Block 0xa180: Unclassified control flow transfer.
Incomplete.
Discovering 0x9fe0
Complete.
Discovering 0xa1a0
Block 0xa1ad: segment1+0xa1cf: Could not decode instruction 3effe0
Incomplete.
Discovering 0xa530
Complete.
Discovering 0xa5b0
Complete.
Discovering 0xa5f0
Complete.
Discovering 0xa670
Complete.
Discovering 0xa6f0
Complete.
Discovering 0xa770
Complete.
Discovering 0xa7b0
Complete.
Discovering 0xa7f0
Complete.
Discovering 0xa880
Complete.
Discovering 0xa900
Complete.
Discovering 0xa9d0
Block 0xac06: Unclassified control flow transfer.
Block 0xba08: Unclassified control flow transfer.
Incomplete.
Discovering 0xb8c0
Complete.
Discovering 0xbfc0
Complete.
Discovering 0xc010
Complete.
Discovering 0xc060
Complete.
Discovering 0xc0b0
Complete.
Discovering 0xc0f0
Complete.
Discovering 0xc140
Complete.
Discovering 0xc180
Complete.
Discovering 0xc210
Complete.
Discovering 0xc290
Complete.
Discovering 0xc320
Complete.
Discovering 0xc3b0
Complete.
Discovering 0xc450
Complete.
Discovering 0xc4d0
Complete.
Discovering 0xc510
Complete.
Discovering 0xc560
Complete.
Discovering 0xc5b0
Complete.
Discovering 0xc600
Complete.
Discovering 0xc640
Complete.
Discovering 0xc690
Complete.
Discovering 0xc720
Complete.
Discovering 0xc7b0
Complete.
Discovering 0xc850
Complete.
Discovering 0xc8c0
Complete.
Discovering 0xc930
Complete.
Discovering 0xc9f0
Complete.
Discovering 0xcab0
Complete.
Discovering 0xcb30
Complete.
Discovering 0xcbb0
Complete.
Discovering 0xcca0
Complete.
Discovering 0xd3e0
Complete.
Discovering 0xd4d0
Complete.
Discovering 0xd4e0
Complete.
Discovering 0xd5f0
Complete.
Discovering 0xd680
Complete.
Discovering 0xd7b0
Complete.
Discovering 0xd830
Complete.
Discovering 0xd890
Complete.
Discovering 0xd900
Complete.
Discovering 0xdfc0
Complete.
Discovering 0xdfd0
Complete.
Discovering 0xdfe0
Complete.
Discovering 0xe090
Complete.
Discovering 0xe0d0
Complete.
Discovering 0xe140
Complete.
Discovering 0xe1a0
Complete.
Discovering 0xe1d0
Complete.
Discovering 0xe290
Block 0xe370: Unclassified control flow transfer.
Incomplete.
Discovering 0xe320
Complete.
Discovering 0xe380
Complete.
Discovering 0xe500
Complete.
Discovering 0xe510
Complete.
Discovering 0xe530
Complete.
Discovering 0xe630
Complete.
Discovering 0xe6e0
Complete.
Discovering 0xeae0
Complete.
Discovering 0xeb50
Complete.
Discovering 0xeba0
Complete.
Discovering 0xebc0
Complete.
Discovering 0xebd0
Block 0xebde: Unclassified control flow transfer.
Incomplete.
Discovering 0xec00
Complete.
Discovering 0xed00
Block 0xed0f: Unsupported instruction at segment1+0xed14: II {iiLockPrefix = NoLockPrefix, iiAddrSize = Size64, iiOp = "comiss", iiArgs = [(XMMReg xmm0,RG_XMM_reg Nothing),(Mem128 (IP_Offset_64 ss (Disp32 0xd259)),RM_XMM Nothing)], iiPrefixes = Prefixes {_prLockPrefix = NoLockPrefix, _prSP = SegmentPrefix {unwrapSegmentPrefix = 0}, _prREX = 0b00000000, _prVEX = Nothing, _prASO = False, _prOSO = False}, iiRequiredPrefix = Nothing, iiOpcode = [15,47], iiRequiredMod = Nothing, iiRequiredReg = Nothing, iiRequiredRM = Nothing}
Incomplete.
Discovering 0xed80
Block 0xed9a: Unsupported instruction at segment1+0xeda1: II {iiLockPrefix = NoLockPrefix, iiAddrSize = Size64, iiOp = "comiss", iiArgs = [(XMMReg xmm0,RG_XMM_reg Nothing),(Mem128 (IP_Offset_64 ss (Disp32 0xd1e0)),RM_XMM Nothing)], iiPrefixes = Prefixes {_prLockPrefix = NoLockPrefix, _prSP = SegmentPrefix {unwrapSegmentPrefix = 0}, _prREX = 0b00000000, _prVEX = Nothing, _prASO = False, _prOSO = False}, iiRequiredPrefix = Nothing, iiOpcode = [15,47], iiRequiredMod = Nothing, iiRequiredReg = Nothing, iiRequiredRM = Nothing}
Incomplete.
Discovering 0xeeb0
Complete.
Discovering 0xf000
Complete.
Discovering 0xf010
Complete.
Discovering 0xf020
Complete.
Discovering 0xf030
Complete.
Discovering 0xf090
Complete.
Discovering 0xf100
Complete.
Discovering 0xf260
Complete.
Discovering 0xf2c0
Block 0xf2db: Unclassified control flow transfer.
Block 0xf307: Unclassified control flow transfer.
Incomplete.
Discovering 0xf310
Complete.
Discovering 0xf380
Complete.
Discovering 0xf3d0
Complete.
Discovering 0xf450
Complete.
Discovering 0xf490
Complete.
Discovering 0xf4c0
Complete.
Discovering 0xf5d0
Complete.
Discovering 0xf680
Complete.
Discovering 0xf770
Block 0xf856: Unclassified control flow transfer.
Incomplete.
Discovering 0xf900
Block 0xf900: Unclassified control flow transfer.
Incomplete.
Discovering 0xfba0
Complete.
Discovering 0xfc00
Block 0xfc9d: Unsupported instruction at segment1+0xfca1: II {iiLockPrefix = NoLockPrefix, iiAddrSize = Size64, iiOp = "comiss", iiArgs = [(XMMReg xmm1,RG_XMM_reg Nothing),(XMMReg xmm0,RM_XMM Nothing)], iiPrefixes = Prefixes {_prLockPrefix = NoLockPrefix, _prSP = SegmentPrefix {unwrapSegmentPrefix = 0}, _prREX = 0b00000000, _prVEX = Nothing, _prASO = False, _prOSO = False}, iiRequiredPrefix = Nothing, iiOpcode = [15,47], iiRequiredMod = Nothing, iiRequiredReg = Nothing, iiRequiredRM = Nothing}
Incomplete.
Discovering 0xfe00
Complete.
Discovering 0xfe30
Complete.
Discovering 0xfe50
Complete.
Discovering 0xfe80
Complete.
Discovering 0xfec0
Complete.
Discovering 0xfee0
Block 0xfee0: Unsupported instruction at segment1+0xfeea: II {iiLockPrefix = NoLockPrefix, iiAddrSize = Size64, iiOp = "fcomi", iiArgs = [(X87Register 0,RG_ST 0),(X87Register 1,RG_ST 1)], iiPrefixes = Prefixes {_prLockPrefix = NoLockPrefix, _prSP = SegmentPrefix {unwrapSegmentPrefix = 0}, _prREX = 0b00000000, _prVEX = Nothing, _prASO = False, _prOSO = False}, iiRequiredPrefix = Nothing, iiOpcode = [219], iiRequiredMod = Just OnlyReg, iiRequiredReg = Just (Fin8 {unFin8 = 6}), iiRequiredRM = Just (Fin8 {unFin8 = 1})}
Incomplete.
Discovering 0xffa0
Block 0x10095: Unsupported instruction at segment1+0x1009a: II {iiLockPrefix = NoLockPrefix, iiAddrSize = Size64, iiOp = "fild", iiArgs = [(Mem64 (Addr_64 ss (Just rsp) Nothing (Disp8 32)),M_X QSize)], iiPrefixes = Prefixes {_prLockPrefix = NoLockPrefix, _prSP = SegmentPrefix {unwrapSegmentPrefix = 0}, _prREX = 0b00000000, _prVEX = Nothing, _prASO = False, _prOSO = False}, iiRequiredPrefix = Nothing, iiOpcode = [223], iiRequiredMod = Just OnlyMem, iiRequiredReg = Just (Fin8 {unFin8 = 5}), iiRequiredRM = Nothing}
Incomplete.
Discovering 0x109e0
Complete.
Discovering 0x10bc0
Complete.
Discovering 0x10c60
Complete.
Discovering 0x10d70
Complete.
Discovering 0x10e10
Complete.
Discovering 0x10f20
Complete.
Discovering 0x10fc0
Complete.
Discovering 0x11020
Complete.
Discovering 0x11400
Complete.
Discovering 0x114b0
Complete.
Discovering 0x116d0
Complete.
Discovering 0x11700
Complete.
Discovering 0x11940
Complete.
Discovering 0x11950
Complete.
Discovering 0x119a0
Complete.
Discovering 0x119f0
Block 0x11b9b: segment1+0x11bac: Could not decode instruction 3effe0
Incomplete.
Discovering 0x13280
Complete.
Discovering 0x132d0
Complete.
Discovering 0x13390
Complete.
Discovering 0x13470
Block 0x134dd: Unclassified control flow transfer.
Incomplete.
Discovering 0x146c0
Block 0x146df: Unclassified control flow transfer.
Incomplete.
Discovering 0x14860
Complete.
Discovering 0x148a0
Complete.
Discovering 0x148c0
Complete.
Discovering 0x148e0
Complete.
Discovering 0x14920
Complete.
Discovering 0x14940
Block 0x14940: Unclassified control flow transfer.
Incomplete.
Discovering 0x14980
Complete.
Discovering 0x14a00
Complete.
Discovering 0x14af0
Complete.
Discovering 0x14b00
Complete.
Discovering 0x14ba0
Complete.
Discovering 0x14bc0
Complete.
Discovering 0x14bd0
Complete.
Discovering 0x14bf0
Complete.
Discovering 0x14c10
Block 0x14c10: Unclassified control flow transfer.
Incomplete.
Discovering 0x14cb0
Block 0x14cb0: Unclassified control flow transfer.
Incomplete.
Discovering 0x14d40
Complete.
Discovering 0x14d50
Complete.
Discovering 0x14d70
Complete.
Discovering 0x14e10
Complete.
Discovering 0x14e30
Complete.
Discovering 0x14e50
Complete.
Discovering 0x14e60
Block 0x14e60: Unclassified control flow transfer.
Incomplete.
Discovering 0x14f00
Block 0x14f00: Unclassified control flow transfer.
Incomplete.
Discovering 0x14fa0
Complete.
Discovering 0x14fb0
Complete.
Discovering 0x14fd0
Complete.
Discovering 0x14ff0
Complete.
Discovering 0x15000
Complete.
Discovering 0x15020
Complete.
Discovering 0x15040
Complete.
Discovering 0x15060
Complete.
Discovering 0x15190
Complete.
Discovering 0x15230
Complete.
Discovering 0x15250
Block 0x152ea: segment1+0x152f8: Could not decode instruction 3effe0
Incomplete.
Discovering 0x156a0
Complete.
Discovering 0x156c0
Complete.
Discovering 0x15750
Complete.
Discovering 0x15830
Complete.
Discovering 0x158c0
Block 0x158fd: Unclassified control flow transfer.
Block 0x15905: Unclassified control flow transfer.
Incomplete.
Discovering 0x158e0
Block 0x15905: Unclassified control flow transfer.
Incomplete.
Discovering 0x15910
Complete.
Discovering 0x15920
Block 0x1597d: Unclassified control flow transfer.
Block 0x159c1: Unclassified control flow transfer.
Incomplete.
Discovering 0x15960
Block 0x159c1: Unclassified control flow transfer.
Incomplete.
Discovering 0x15990
Block 0x159c1: Unclassified control flow transfer.
Incomplete.
Discovering 0x15a20
Block 0x15a8e: Unclassified control flow transfer.
Incomplete.
Discovering 0x15a80
Complete.
Discovering 0x15aa0
Block 0x15af9: Unclassified control flow transfer.
Incomplete.
Discovering 0x15ae0
Complete.
Discovering 0x15b10
Complete.
Discovering 0x15b30
Complete.
Discovering 0x15b70
Complete.
Discovering 0x15c70
Complete.
Discovering 0x15ca0
Complete.
Discovering 0x15cd0
Complete.
Discovering 0x15db0
Block 0x15ee8: segment1+0x15ef9: Could not decode instruction 3effe0
Block 0x15f12: segment1+0x15f23: Could not decode instruction 3effe0
Incomplete.
Discovering 0x16270
Block 0x162f8: Unclassified control flow transfer.
Block 0x16332: Unclassified control flow transfer.
Incomplete.
Discovering 0x16340
Block 0x16478: segment1+0x16489: Could not decode instruction 3effe0
Block 0x164a2: segment1+0x164b3: Could not decode instruction 3effe0
Incomplete.
Discovering 0x16800
Complete.
Discovering 0x16870
Complete.
Discovering 0x16890
Complete.
Discovering 0x168b0
Complete.
Discovering 0x168d0
Complete.
Discovering 0x16960
Complete.
Discovering 0x169b0
Complete.
Discovering 0x169d0
Complete.
Discovering 0x169f0
Block 0x16a73: Unclassified control flow transfer.
Incomplete.
Discovering _obstack_begin(0x16a80)
Complete.
Discovering _obstack_begin_1(0x16aa0)
Complete.
Discovering _obstack_newchunk(0x16ac0)
Block 0x16bd3: Unclassified control flow transfer.
Block 0x16be0: Unclassified control flow transfer.
Block 0x16be6: Unclassified control flow transfer.
Incomplete.
Discovering _obstack_allocated_p(0x16bb0)
Complete.
Discovering _obstack_free(0x16bf0)
Block 0x16c35: Unclassified control flow transfer.
Incomplete.
Discovering _obstack_memory_used(0x16c60)
Complete.
Discovering 0x16c90
Complete.
Discovering 0x16cc0
Complete.
Discovering 0x16cf0
Complete.
Discovering 0x16d50
Complete.
Discovering 0x16df0
Complete.
Discovering 0x16f50
Complete.
Discovering 0x17010
Complete.
Discovering 0x17030
Complete.
Discovering 0x170e0
Complete.
Discovering 0x17230
Complete.
Discovering 0x17270
Complete.
Discovering 0x172e0
Complete.
Discovering 0x17300
Complete.
Discovering 0x17340
Complete.
Discovering 0x17380
Complete.
Discovering 0x17410
Complete.
Discovering 0x17460
Complete.
Discovering 0x174e0
Candidate function 0x4000 (called at 174e0).
Complete.
Discovering 0x4000
Complete.
Discovering 0x17550
Complete.
Discovering 0x17560
Complete.
Argument inference
reopt_1_0x4000(0x4000): Could not determine signature at callsite 0x4014:
Indirect call target.
reopt_1_0x4da0(0x4da0): Could not determine signature at callsite 0x4da0:
Unknown arguments to abort.
reopt_1_0x4da5(0x4da5): Could not determine signature at callsite 0x4da5:
Unknown arguments to abort.
reopt_1_0x4daa(0x4daa): Could not determine signature at callsite 0x4daa:
Unknown arguments to abort.
reopt_1_0x4daf(0x4daf): Could not determine signature at callsite 0x4daf:
Unknown arguments to abort.
reopt_1_0x4db4(0x4db4): Could not determine signature at callsite 0x4db4:
Unknown arguments to abort.
reopt_1_0x4db9(0x4db9): Could not determine signature at callsite 0x4db9:
Unknown arguments to abort.
reopt_1_0x4dbe(0x4dbe): Could not determine signature at callsite 0x4dbe:
Unknown arguments to abort.
reopt_1_0x4dc3(0x4dc3): Could not determine signature at callsite 0x4dc3:
Unknown arguments to abort.
reopt_1_0x4dc8(0x4dc8): Could not determine signature at callsite 0x4dc8:
Unknown arguments to abort.
reopt_1_0x4dcd(0x4dcd): Could not determine signature at callsite 0x4dcd:
Unknown arguments to abort.
reopt_1_0x4dd2(0x4dd2): Could not determine signature at callsite 0x4dd2:
Unknown arguments to abort.
reopt_1_0x4dd7(0x4dd7): Could not determine signature at callsite 0x4dd7:
Unknown arguments to abort.
reopt_1_0x4ddc(0x4ddc): Could not determine signature at callsite 0x4ddc:
Unknown arguments to abort.
reopt_1_0x4de1(0x4de1): Could not determine signature at callsite 0x4de1:
Unknown arguments to abort.
reopt_1_0x4de6(0x4de6): Could not determine signature at callsite 0x4de6:
Unknown arguments to abort.
reopt_1_0x4deb(0x4deb): Could not determine signature at callsite 0x4deb:
Unknown arguments to abort.
reopt_1_0x4df0(0x4df0): Could not determine signature at callsite 0x4e2c:
Unknown arguments to setlocale.
reopt_1_0x67d0(0x67d0): Could not determine signature at callsite 0x67f8:
Indirect call target.
reopt_1_0x6b30(0x6b30): Could not determine signature at callsite 0x6b34:
Unknown arguments to free.
reopt_1_0x6c30(0x6c30): Could not determine signature at callsite 0x6cef:
Unknown arguments to nl_langinfo.
reopt_1_0x6ef0(0x6ef0): Could not determine signature at callsite 0x6efa:
Unknown arguments to strcmp.
reopt_1_0x6f00(0x6f00): Could not determine signature at callsite 0x6f0d:
Unknown arguments to strcmp.
reopt_1_0x6f20(0x6f20): Could not determine signature at callsite 0x6f27:
Unknown arguments to free.
reopt_1_0x7020(0x7020): Could not determine signature at callsite 0x7086:
Unknown arguments to strlen.
reopt_1_0x70a0(0x70a0): Could not determine signature at callsite 0x70ae:
Unknown arguments to strlen.
reopt_1_0x7180(0x7180): Could not determine signature at callsite 0x71df:
Unknown arguments to _setjmp.
reopt_1_0x7310(0x7310): Could not determine signature at callsite 0x7335:
Unknown arguments to strcoll.
reopt_1_0x7390(0x7390): Could not determine signature at callsite 0x7443:
Unknown arguments to free.
reopt_1_0x7520(0x7520): Could not determine signature at callsite 0x75bd:
Unknown arguments to __overflow.
reopt_1_0x75f0(0x75f0): Could not determine signature at callsite 0x765a:
Unknown arguments to fputs_unlocked.
reopt_1_0x76c0(0x76c0): Could not determine signature at callsite 0x76ef:
Unknown arguments to fputs_unlocked.
reopt_1_0x77f0(0x77f0): Could not determine signature at callsite 0x781b:
Unknown arguments to error.
reopt_1_0x7860(0x7860): Could not determine signature at callsite 0x7876:
Unknown arguments to strcmp.
reopt_1_0x7900(0x7900): Could not determine signature at callsite 0x794a:
Unknown arguments to strcmp.
reopt_1_0x79d0(0x79d0): Could not determine signature at callsite 0x7a22:
Unknown arguments to strcmp.
reopt_1_0x7b30(0x7b30): Could not determine signature at callsite 0x7b73:
Unknown arguments to __overflow.
reopt_1_0x7b80(0x7b80): Could not determine signature at callsite 0x7be0:
Unknown arguments to strcmp.
reopt_1_0x7cd0(0x7cd0): Could not determine signature at callsite 0x7d3f:
Unknown arguments to strrchr.
reopt_1_0x7dc0(0x7dc0): Could not determine signature at callsite 0x7e18:
Unknown arguments to sigismember.
reopt_1_0x7ff0(0x7ff0): Could not determine signature at callsite 0x801e:
Unknown arguments to fwrite_unlocked.
reopt_1_0x8090(0x8090): Could not determine signature at callsite 0x80bf:
Unknown arguments to fflush_unlocked.
reopt_1_0x81e0(0x81e0): Could not determine signature at callsite 0x8284:
Unknown arguments to strlen.
reopt_1_0x8650(0x8650): Could not determine signature at callsite 0x879a:
Unknown arguments to free.
reopt_1_0x8a60(0x8a60): Could not determine signature at callsite 0x8ce3:
Unknown arguments to strlen.
reopt_1_0x9050(0x9050): Could not determine signature at callsite 0x91b8:
Unknown arguments to __sprintf_chk.
reopt_1_0x9ab0(0x9ab0): Could not determine signature at callsite 0x9b19:
Unknown arguments to free.
reopt_1_0x9b50(0x9b50): Could not determine signature at callsite 0x9c77:
Unknown arguments to strlen.
reopt_1_0x9d00(0x9d00): Could not determine signature at callsite 0xa154:
Unknown arguments to __overflow.
reopt_1_0x9fe0(0x9fe0): Could not determine signature at callsite 0xa154:
Unknown arguments to __overflow.
reopt_1_0xa530(0xa530): Could not determine signature at callsite 0xa58e:
Unknown arguments to strcmp.
reopt_1_0xa670(0xa670): Could not determine signature at callsite 0xa6c6:
Unknown arguments to strcmp.
reopt_1_0xa7b0(0xa7b0): Could not determine signature at callsite 0xa7c9:
Unknown arguments to strcmp.
reopt_1_0xa7f0(0xa7f0): Could not determine signature at callsite 0xa85c:
Unknown arguments to strcmp.
reopt_1_0xa880(0xa880): Could not determine signature at callsite 0xa8e0:
Unknown arguments to strcmp.
reopt_1_0xa900(0xa900): Could not determine signature at callsite 0xa93d:
Unknown arguments to __sprintf_chk.
reopt_1_0xa9d0(0xa9d0): Could not determine signature at callsite 0xab2d:
Unknown arguments to __lxstat.
reopt_1_0xb8c0(0xb8c0): Could not determine signature at callsite 0xb903:
Unknown arguments to opendir.
reopt_1_0xc4d0(0xc4d0): Could not determine signature at callsite 0xc4ef:
Unknown arguments to strcmp.
reopt_1_0xc510(0xc510): Could not determine signature at callsite 0xc532:
Unknown arguments to strcmp.
reopt_1_0xc560(0xc560): Could not determine signature at callsite 0xc58b:
Unknown arguments to strcmp.
reopt_1_0xc5b0(0xc5b0): Could not determine signature at callsite 0xc5d2:
Unknown arguments to strcmp.
reopt_1_0xc600(0xc600): Could not determine signature at callsite 0xc61f:
Unknown arguments to strcmp.
reopt_1_0xc640(0xc640): Could not determine signature at callsite 0xc66e:
Unknown arguments to strcmp.
reopt_1_0xc690(0xc690): Could not determine signature at callsite 0xc6f8:
Unknown arguments to strcmp.
reopt_1_0xc720(0xc720): Could not determine signature at callsite 0xc788:
Unknown arguments to strcmp.
reopt_1_0xc7b0(0xc7b0): Could not determine signature at callsite 0xc824:
Unknown arguments to strcmp.
reopt_1_0xc850(0xc850): Could not determine signature at callsite 0xc866:
Unknown arguments to strrchr.
reopt_1_0xc8c0(0xc8c0): Could not determine signature at callsite 0xc8d7:
Unknown arguments to strrchr.
reopt_1_0xc930(0xc930): Could not determine signature at callsite 0xc98c:
Unknown arguments to strrchr.
reopt_1_0xc9f0(0xc9f0): Could not determine signature at callsite 0xca4c:
Unknown arguments to strrchr.
reopt_1_0xcab0(0xcab0): Could not determine signature at callsite 0xcac7:
Unknown arguments to strrchr.
reopt_1_0xcb30(0xcb30): Could not determine signature at callsite 0xcb47:
Unknown arguments to strrchr.
reopt_1_0xcbb0(0xcbb0): Could not determine signature at callsite 0xcc1f:
Unknown arguments to strrchr.
reopt_1_0xcca0(0xcca0): Could not determine signature at callsite 0xccdc:
Unknown arguments to dcgettext.
reopt_1_0xd3e0(0xd3e0): Could not determine signature at callsite 0xd423:
Unknown arguments to malloc.
reopt_1_0xd4e0(0xd4e0): Could not determine signature at callsite 0xd508:
Unknown arguments to strlen.
reopt_1_0xd5f0(0xd5f0): Could not determine signature at callsite 0xd618:
Unknown arguments to dcgettext.
reopt_1_0xd680(0xd680): Could not determine signature at callsite 0xd6bf:
Unknown arguments to dcgettext.
reopt_1_0xd7b0(0xd7b0): Could not determine signature at callsite 0xd81c:
Indirect call target.
reopt_1_0xd900(0xd900): Could not determine signature at callsite 0xd96f:
Unknown arguments to strlen.
reopt_1_0xdfe0(0xdfe0): Could not determine signature at callsite 0xe037:
Unknown arguments to dcgettext.
reopt_1_0xe0d0(0xe0d0): Could not determine signature at callsite 0xe0f3:
Unknown arguments to malloc.
reopt_1_0xe1a0(0xe1a0): Could not determine signature at callsite 0xe1a8:
Unknown arguments to strlen.
reopt_1_0xe1d0(0xe1d0): Could not determine signature at callsite 0xe207:
Unknown arguments to getxattr.
reopt_1_0xe510(0xe510): Could not determine signature at callsite 0xe56b:
Unknown arguments to strlen.
reopt_1_0xe530(0xe530): Could not determine signature at callsite 0xe56b:
Unknown arguments to strlen.
reopt_1_0xe6e0(0xe6e0): Could not determine signature at callsite 0xe706:
Unknown arguments to strcmp.
reopt_1_0xeae0(0xeae0): Could not determine signature at callsite 0xeb01:
Unknown arguments to clock_gettime.
reopt_1_0xeb50(0xeb50): Could not determine signature at callsite 0xeb5a:
Unknown arguments to setlocale.
reopt_1_0xebd0(0xebd0): Could not determine signature at callsite 0xebdb:
Indirect call target.
reopt_1_0xec00(0xec00): Could not determine signature at callsite 0xec33:
Indirect call target.
reopt_1_0xeeb0(0xeeb0): Could not determine signature at callsite 0xefdf:
Unknown arguments to malloc.
reopt_1_0xf100(0xf100): Could not determine signature at callsite 0xf181:
Unknown arguments to __fprintf_chk.
reopt_1_0xf260(0xf260): Could not determine signature at callsite 0xf28b:
Indirect call target.
reopt_1_0xf3d0(0xf3d0): Could not determine signature at callsite 0xf43b:
Indirect call target.
reopt_1_0xf4c0(0xf4c0): Could not determine signature at callsite 0xf502:
Unknown arguments to malloc.
reopt_1_0xf5d0(0xf5d0): Could not determine signature at callsite 0xf623:
Indirect call target.
reopt_1_0xf680(0xf680): Could not determine signature at callsite 0xf6d3:
Indirect call target.
reopt_1_0xf770(0xf770): Could not determine signature at callsite 0xf7c8:
Unknown arguments to calloc.
reopt_1_0xfe80(0xfe80): Could not determine signature at callsite 0xfeac:
Unknown arguments to strcmp.
reopt_1_0xfec0(0xfec0): Could not determine signature at callsite 0xfecb:
Unknown arguments to free.
reopt_1_0xffa0(0xffa0): Could not determine signature at callsite 0xfffb:
Unknown arguments to localeconv.
reopt_1_0x109e0(0x109e0): Could not determine signature at callsite 0x10b04:
Unknown arguments to getenv.
reopt_1_0x10bc0(0x10bc0): Could not determine signature at callsite 0x10c09:
Unknown arguments to getpwuid.
reopt_1_0x10c60(0x10c60): Could not determine signature at callsite 0x10c96:
Unknown arguments to strcmp.
reopt_1_0x10d70(0x10d70): Could not determine signature at callsite 0x10db9:
Unknown arguments to getgrgid.
reopt_1_0x10e10(0x10e10): Could not determine signature at callsite 0x10e46:
Unknown arguments to strcmp.
reopt_1_0x11020(0x11020): Could not determine signature at callsite 0x1104a:
Unknown arguments to strlen.
reopt_1_0x11400(0x11400): Could not determine signature at callsite 0x1143d:
Unknown arguments to realloc.
reopt_1_0x114b0(0x114b0): Could not determine signature at callsite 0x114dd:
Unknown arguments to __ctype_get_mb_cur_max.
reopt_1_0x116d0(0x116d0): Could not determine signature at callsite 0x116e1:
Unknown arguments to strlen.
reopt_1_0x11700(0x11700): Could not determine signature at callsite 0x11745:
Indirect call target.
reopt_1_0x11950(0x11950): Could not determine signature at callsite 0x11963:
Unknown arguments to __ctype_tolower_loc.
reopt_1_0x119a0(0x119a0): Could not determine signature at callsite 0x119b3:
Unknown arguments to __ctype_toupper_loc.
reopt_1_0x119f0(0x119f0): Could not determine signature at callsite 0x11c57:
Unknown arguments to memset.
reopt_1_0x132d0(0x132d0): Could not determine signature at callsite 0x132e6:
Unknown arguments to strrchr.
reopt_1_0x13470(0x13470): Could not determine signature at callsite 0x134d8:
Unknown arguments to __ctype_get_mb_cur_max.
reopt_1_0x14b00(0x14b00): Could not determine signature at callsite 0x14b37:
Unknown arguments to free.
reopt_1_0x15060(0x15060): Could not determine signature at callsite 0x150a9:
Unknown arguments to __fxstatat.
reopt_1_0x15250(0x15250): Could not determine signature at callsite 0x1528b:
Unknown arguments to __fprintf_chk.
reopt_1_0x15830(0x15830): Could not determine signature at callsite 0x15843:
Unknown arguments to dcgettext.
reopt_1_0x158c0(0x158c0): Could not determine signature at callsite 0x158c8:
Unknown arguments to malloc.
reopt_1_0x15920(0x15920): Could not determine signature at callsite 0x15935:
Unknown arguments to realloc.
reopt_1_0x15a80(0x15a80): Could not determine signature at callsite 0x15a98:
Unknown arguments to memset.
reopt_1_0x15aa0(0x15aa0): Could not determine signature at callsite 0x15abe:
Unknown arguments to calloc.
reopt_1_0x15ae0(0x15ae0): Could not determine signature at callsite 0x15b09:
Unknown arguments to memcpy.
reopt_1_0x15b10(0x15b10): Could not determine signature at callsite 0x15b18:
Unknown arguments to strlen.
reopt_1_0x15b30(0x15b30): Could not determine signature at callsite 0x15b48:
Unknown arguments to dcgettext.
reopt_1_0x15b70(0x15b70): Could not determine signature at callsite 0x15c11:
Unknown arguments to error.
reopt_1_0x15ca0(0x15ca0): Could not determine signature at callsite 0x15caa:
Unknown arguments to getcwd.
reopt_1_0x15cd0(0x15cd0): Could not determine signature at callsite 0x15d38:
Unknown arguments to gethostname.
reopt_1_0x15db0(0x15db0): Could not determine signature at callsite 0x15e0a:
Unknown arguments to __ctype_b_loc.
reopt_1_0x16270(0x16270): Could not determine signature at callsite 0x162d2:
Unknown arguments to dcgettext.
reopt_1_0x16340(0x16340): Could not determine signature at callsite 0x1639a:
Unknown arguments to __ctype_b_loc.
reopt_1_0x16800(0x16800): Could not determine signature at callsite 0x16834:
Unknown arguments to freecon.
reopt_1_0x16870(0x16870): Could not determine signature at callsite 0x16878:
Unknown arguments to getfilecon.
reopt_1_0x16890(0x16890): Could not determine signature at callsite 0x16898:
Unknown arguments to lgetfilecon.
reopt_1_0x168b0(0x168b0): Could not determine signature at callsite 0x168b8:
Unknown arguments to fgetfilecon.
reopt_1_0x168d0(0x168d0): Could not determine signature at callsite 0x16906:
Unknown arguments to mbrtowc.
reopt_1_0x16960(0x16960): Could not determine signature at callsite 0x16978:
Unknown arguments to dcgettext.
reopt_1_0x169b0(0x169b0): Could not determine signature at callsite 0x169be:
Indirect call target.
reopt_1_0x169d0(0x169d0): Could not determine signature at callsite 0x169de:
Indirect call target.
reopt_1_0x169f0(0x169f0): Could not determine signature at callsite 0x16a6d:
Indirect call target.
_obstack_newchunk(0x16ac0): Could not determine signature at callsite 0x16b55:
Unknown arguments to memcpy.
reopt_1_0x16c90(0x16c90): Could not determine signature at callsite 0x16ca4:
Unknown arguments to setenv.
reopt_1_0x16cc0(0x16cc0): Could not determine signature at callsite 0x16cd6:
Unknown arguments to free.
reopt_1_0x16cf0(0x16cf0): Could not determine signature at callsite 0x16d40:
Unknown arguments to tzset.
reopt_1_0x16d50(0x16d50): Could not determine signature at callsite 0x16d60:
Unknown arguments to strlen.
reopt_1_0x16df0(0x16df0): Could not determine signature at callsite 0x16e36:
Unknown arguments to strcmp.
reopt_1_0x16f50(0x16f50): Could not determine signature at callsite 0x16f5e:
Unknown arguments to getenv.
reopt_1_0x17030(0x17030): Could not determine signature at callsite 0x17060:
Unknown arguments to localtime_r.
reopt_1_0x170e0(0x170e0): Could not determine signature at callsite 0x17120:
Unknown arguments to mktime.
reopt_1_0x17270(0x17270): Could not determine signature at callsite 0x1727b:
Unknown arguments to __fpending.
reopt_1_0x172e0(0x172e0): Could not determine signature at callsite 0x1732e:
Indirect call target.
reopt_1_0x17340(0x17340): Could not determine signature at callsite 0x1734d:
Unknown arguments to nl_langinfo.
reopt_1_0x17380(0x17380): Could not determine signature at callsite 0x1738b:
Unknown arguments to fileno.
reopt_1_0x17410(0x17410): Could not determine signature at callsite 0x1741d:
Unknown arguments to __freading.
reopt_1_0x17460(0x17460): Could not determine signature at callsite 0x1747e:
Unknown arguments to fseeko.
reopt_1_0x174e0(0x174e0): Could not determine signature at callsite 0x17529:
Indirect call target.
reopt_1_0x17560(0x17560): Could not determine signature at callsite 0x1756d:
Unknown arguments to __cxa_atexit.
Complete.
Analyzing 0x68c0
Complete.
Recovering 0x68c0
Complete.
Analyzing 0x68d0
Complete.
Recovering 0x68d0
Complete.
Analyzing 0x68f0
Complete.
Recovering 0x68f0
Failed (0x68f0:3, Unsupported function value): Recover r8 failed: Cannot lift relative addr segment1+0x24218
Analyzing 0x6b40
Complete.
Recovering 0x6b40
Failed (0x6b40:24, Unsupported function value): Recover r45 failed: Cannot lift relative addr segment1+0x23060
Analyzing 0x6bb0
Complete.
Recovering 0x6bb0
Failed (0x6bb0:20, Unimplemented LLVM backend feature): LLVM backend does not yet support: fs.base
Analyzing 0x6e80
Complete.
Recovering 0x6e80
Failed (0x6ec4:1, Unsupported function value): Recover r205 failed: Cannot lift relative addr segment1+0x24380
Analyzing 0x6f70
Block: 0x6f80: Unknown arguments to reopt_1_0x6f20.
Analyzing 0x7340
Block: 0x7340: Unknown arguments to reopt_1_0x7310.
Analyzing 0x7350
Block: 0x7350: Unknown arguments to reopt_1_0x7310.
Analyzing 0x7360
Block: 0x7360: Unknown arguments to reopt_1_0xe6e0.
Analyzing 0x7380
Block: 0x7380: Unknown arguments to reopt_1_0xe6e0.
Analyzing 0x7780
Block: 0x77a2: Unknown arguments to reopt_1_0x76c0.
Analyzing 0x77d0
Complete.
Recovering 0x77d0
Failed (0x77d0:3, Unsupported function value): Recover r8 failed: Cannot lift relative addr segment1+0x24218
Analyzing 0x78a0
Block: 0x78e4: Unknown arguments to reopt_1_0x7310.
Analyzing 0x7960
Block: 0x79ac: Unknown arguments to reopt_1_0x7310.
Analyzing 0x7a40
Complete.
Recovering 0x7a40
Failed (0x7a53:4, Unsupported function value): Recover r57 failed: Cannot lift relative addr segment1+0x24314
Analyzing 0x7c00
Block: 0x7c4c: Unknown arguments to reopt_1_0xe6e0.
Analyzing 0x7c70
Block: 0x7cb4: Unknown arguments to reopt_1_0xe6e0.
Analyzing 0x7f90
Block: 0x7f9a: Unknown arguments to reopt_1_0x7ff0.
Analyzing 0x8060
Block: 0x8060: Unknown arguments to reopt_1_0x7ff0.
Analyzing 0x8170
Block: 0x81a0: Unknown arguments to reopt_1_0x7ff0.
Analyzing 0x8eb0
Block: 0x8f97: Unknown arguments to reopt_1_0x8a60.
Analyzing 0xa5b0
Block: 0xa5c0: Unknown arguments to reopt_1_0x7310.
Analyzing 0xa5f0
Block: 0xa640: Unknown arguments to reopt_1_0x7310.
Analyzing 0xa6f0
Block: 0xa748: Unknown arguments to reopt_1_0x7310.
Analyzing 0xa770
Block: 0xa783: Unknown arguments to reopt_1_0x7310.
Analyzing 0xbfc0
Block: 0xbfe8: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc010
Block: 0xc02c: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc060
Block: 0xc085: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc0b0
Block: 0xc0c9: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc0f0
Block: 0xc10c: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc140
Block: 0xc159: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc180
Block: 0xc1e2: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc210
Block: 0xc26a: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc290
Block: 0xc2f6: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc320
Block: 0xc382: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc3b0
Block: 0xc41e: Unknown arguments to reopt_1_0x7310.
Analyzing 0xc450
Block: 0xc4aa: Unknown arguments to reopt_1_0x7310.
Analyzing 0xd4d0
Block: 0xd4d0: Unknown arguments to reopt_1_0xcca0.
Analyzing 0xd830
Complete.
Recovering 0xd830
Complete.
Analyzing 0xd890
Complete.
Recovering 0xd890
Complete.
Analyzing 0xdfc0
Complete.
Recovering 0xdfc0
Failed (0xdfc0:3, Unsupported function value): Recover write address failed: Cannot lift relative addr segment1+0x243d8
Analyzing 0xdfd0
Complete.
Recovering 0xdfd0
Failed (0xdfd0:4, Unsupported function value): Recover write address failed: Cannot lift relative addr segment1+0x243d0
Analyzing 0xe090
Complete.
Recovering 0xe090
Complete.
Analyzing 0xe140
Complete.
Recovering 0xe140
Complete.
Analyzing 0xe1a0
Block: 0xe1a0: Unknown arguments to strlen.
Analyzing 0xe320
Block: 0xe33d: Unknown arguments to reopt_1_0xf260.
Analyzing 0xe380
Complete.
Recovering 0xe380
Complete.
Analyzing 0xe500
Complete.
Recovering 0xe500
Complete.
Analyzing 0xe630
Complete.
Recovering 0xe630
Complete.
Analyzing 0xeba0
Complete.
Recovering 0xeba0
Complete.
Analyzing 0xebc0
Complete.
Recovering 0xebc0
Complete.
Analyzing 0xec00
Block: 0xec30: Indirect call target.
Analyzing 0xf000
Complete.
Recovering 0xf000
Complete.
Analyzing 0xf010
Complete.
Recovering 0xf010
Complete.
Analyzing 0xf020
Complete.
Recovering 0xf020
Complete.
Analyzing 0xf030
Complete.
Recovering 0xf030
Complete.
Analyzing 0xf090
Complete.
Recovering 0xf090
Complete.
Analyzing 0xf310
Complete.
Recovering 0xf310
Complete.
Analyzing 0xf380
Complete.
Recovering 0xf380
Complete.
Analyzing 0xf450
Complete.
Recovering 0xf450
Complete.
Analyzing 0xf490
Complete.
Recovering 0xf490
Complete.
Analyzing 0xfba0
Complete.
Recovering 0xfba0
Failed (0xfba0:18, Unimplemented LLVM backend feature): LLVM backend does not yet support: fs.base
Analyzing 0xfe00
Complete.
Recovering 0xfe00
Complete.
Analyzing 0xfe30
Complete.
Recovering 0xfe30
Complete.
Analyzing 0xfe50
Complete.
Recovering 0xfe50
Complete.
Analyzing 0x10f20
Complete.
Recovering 0x10f20
Complete.
Analyzing 0x10fc0
Complete.
Recovering 0x10fc0
Complete.
Analyzing 0x11940
Block: 0x11940: Unknown arguments to reopt_1_0x11700.
Analyzing 0x13280
Block: 0x13280: Unknown arguments to reopt_1_0x119f0.
Analyzing 0x13390
Complete.
Recovering 0x13390
Complete.
Analyzing 0x14860
Block: 0x14870: Unknown arguments to reopt_1_0x15ae0.
Analyzing 0x148a0
Complete.
Recovering 0x148a0
Failed (0x148a0:12, Unsupported function value): Recover r15 failed: Cannot lift relative addr segment1+0x24520
Analyzing 0x148c0
Complete.
Recovering 0x148c0
Failed (0x148c0:12, Unsupported function value): Recover r14 failed: Cannot lift relative addr segment1+0x24520
Analyzing 0x148e0
Complete.
Recovering 0x148e0
Failed (0x148e0:16, Unsupported function value): Recover r115 failed: Cannot lift relative addr segment1+0x24520
Analyzing 0x14920
Complete.
Recovering 0x14920
Failed (0x14920:16, Unsupported function value): Recover r19 failed: Cannot lift relative addr segment1+0x24524
Analyzing 0x14980
Complete.
Recovering 0x14980
Failed (0x14980:55, Unsupported function value): Recover r43 failed: Cannot lift relative addr segment1+0x24520
Analyzing 0x14a00
Complete.
Recovering 0x14a00
Failed (0x14a00:55, Unsupported function value): Recover r42 failed: Cannot lift relative addr segment1+0x24520
Analyzing 0x14af0
Complete.
Recovering 0x14af0
Complete.
Analyzing 0x14ba0
Complete.
Recovering 0x14ba0
Complete.
Analyzing 0x14bc0
Complete.
Recovering 0x14bc0
Complete.
Analyzing 0x14bd0
Complete.
Recovering 0x14bd0
Complete.
Analyzing 0x14bf0
Complete.
Recovering 0x14bf0
Complete.
Analyzing 0x14d40
Complete.
Recovering 0x14d40
Complete.
Analyzing 0x14d50
Complete.
Recovering 0x14d50
Complete.
Analyzing 0x14d70
Complete.
Recovering 0x14d70
Failed (0x14d70:14, Unsupported function value): Recover r130 failed: Cannot lift relative addr segment1+0x24520
Analyzing 0x14e10
Complete.
Recovering 0x14e10
Complete.
Analyzing 0x14e30
Complete.
Recovering 0x14e30
Failed (0x14e30:8, Unsupported function value): Recover rdi failed: Uninitialized value rdi
Analyzing 0x14e50
Complete.
Recovering 0x14e50
Failed (0x14e50:6, Unsupported function value): Recover rdi failed: Uninitialized value rdi
Analyzing 0x14fa0
Complete.
Recovering 0x14fa0
Complete.
Analyzing 0x14fb0
Complete.
Recovering 0x14fb0
Complete.
Analyzing 0x14fd0
Complete.
Recovering 0x14fd0
Complete.
Analyzing 0x14ff0
Complete.
Recovering 0x14ff0
Complete.
Analyzing 0x15000
Complete.
Recovering 0x15000
Complete.
Analyzing 0x15020
Complete.
Recovering 0x15020
Complete.
Analyzing 0x15040
Complete.
Recovering 0x15040
Complete.
Analyzing 0x15190
Block: 0x15202: Unknown arguments to reopt_1_0x15060.
Analyzing 0x15230
Complete.
Recovering 0x15230
Complete.
Analyzing 0x156a0
Block: 0x156bb: Unknown arguments to reopt_1_0x15250.
Analyzing 0x156c0
Block: 0x15730: Unknown arguments to reopt_1_0x15250.
Analyzing 0x15750
Block: 0x15800: Unknown arguments to reopt_1_0x15250.
Analyzing 0x15910
Complete.
Recovering 0x15910
Complete.
Analyzing 0x15b10
Block: 0x15b10: Unknown arguments to strlen.
Analyzing 0x15b30
Block: 0x15b30: Unknown arguments to dcgettext.
Analyzing 0x15c70
Block: 0x15c70: Unknown arguments to reopt_1_0x15b70.
Analyzing _obstack_begin(0x16a80)
Block: 0x16a80: Unknown arguments to reopt_1_0x169f0.
Analyzing _obstack_begin_1(0x16aa0)
Block: 0x16aa0: Unknown arguments to reopt_1_0x169f0.
Analyzing _obstack_allocated_p(0x16bb0)
Complete.
Recovering _obstack_allocated_p(0x16bb0)
Complete.
Analyzing _obstack_memory_used(0x16c60)
Complete.
Recovering _obstack_memory_used(0x16c60)
Complete.
Analyzing 0x17010
Block: 0x1701a: Unknown arguments to reopt_1_0x16cc0.
Analyzing 0x17230
Complete.
Recovering 0x17230
Complete.
Analyzing 0x17300
Complete.
Recovering 0x17300
Complete.
Analyzing 0x17340
Block: 0x17340: Unknown arguments to nl_langinfo.
Analyzing 0x17550
Complete.
Recovering 0x17550
Complete.
Removing cycle (shift 1 252 <: shift 0 252)
Removing cycle (shift 0 213 <: shift 1 213)
Removing cycle (shift 0 197 <: shift 1 197)
Removing cycle (shift 0 185 <: shift 1 185)
Removing cycle (shift 1 144 <: shift 0 144)
Removing cycle (shift 0 295 <: shift 0 136)
Removing cycle (shift 16 130 <: shift 0 130)
Removing cycle (shift 0 294 <: shift 0 131)
Removing cycle (shift 0 295 <: shift 0 290)
Removing cycle (shift 16 124 <: shift 0 124)
Removing cycle (shift 0 316 <: shift 0 114)
Removing cycle (shift 16 113 <: shift 0 108)
Removing cycle (shift 0 323 <: shift 0 316)
Removing cycle (shift 16 324 <: shift 16 113)
Removing cycle (shift 0 323 <: shift 0 114)
Removing cycle (shift 16 102 <: shift 0 98)
Removing cycle (shift 16 333 <: shift 16 102)
Removing cycle (shift 0 341 <: shift 0 80)
Removing cycle (shift 0 342 <: shift 0 79)
Removing cycle (shift 0 341 <: shift 0 80)
Removing cycle (shift 0 342 <: shift 0 79)
Removing cycle (shift 0 345 <: shift 0 83)
Removing cycle (shift 0 346 <: shift 0 82)
Removing cycle (shift 0 353 <: shift 0 80)
Removing cycle (shift 0 354 <: shift 0 79)
Removing cycle (shift 0 370 <: shift 0 48)
Removing cycle (shift 0 371 <: shift 0 46)
Removing cycle (shift 0 371 <: shift 0 46)
Removing cycle (shift 1 44 <: shift 0 44)
Removing cycle (shift 16 12 <: shift 8 12)
Removing cycle (shift 0 296 <: shift 0 131)
Removing cycle (shift 0 376 <: shift 0 378)
Removing cycle (shift 0 373 <: shift 0 378)
Removing cycle (shift 0 373 <: shift 0 376)
Removing cycle (shift 0 387 <: shift 0 130)
Removing cycle (shift 0 393 <: shift 0 391)
opt: <stdin>:378:33: error: invalid forward reference to function 'reopt_1_0xe140' with wrong type: expected 'i64 ({ i8, i8 }*)*' but was '{}* ({ i8, i8 }*)*'
%t5 = call { }* ({ i8, i8 }*) @reopt_1_0xe140({ i8, i8 }* %arg0)
^
root@56d894b61629:~#
Build errors:
Failed to build reopt-0.1.0.
Build log (
/home/lifter/.cabal/logs/ghc-8.6.3/reopt-0.1.0-4c93af2623a0806b496051257d405d45c4692164fbb8e447b413bab21182ef14.log
):
Configuring library for reopt-0.1.0..
Preprocessing library for reopt-0.1.0..
Building library for reopt-0.1.0..
[ 1 of 18] Compiling Reopt.Analysis.Domains.DiffEquations ( src/Reopt/Analysis/Domains/DiffEquations.hs, dist/build/Reopt/Analysis/Domains/DiffEquations.o )
[ 2 of 18] Compiling Reopt.CFG.FnRep ( src/Reopt/CFG/FnRep.hs, dist/build/Reopt/CFG/FnRep.o )
[ 3 of 18] Compiling Reopt.CFG.FnRep.X86 ( src/Reopt/CFG/FnRep/X86.hs, dist/build/Reopt/CFG/FnRep/X86.o )
[ 4 of 18] Compiling Reopt.CFG.FunctionCheck ( src/Reopt/CFG/FunctionCheck.hs, dist/build/Reopt/CFG/FunctionCheck.o )
[ 5 of 18] Compiling Reopt.CFG.LLVM ( src/Reopt/CFG/LLVM.hs, dist/build/Reopt/CFG/LLVM.o )
src/Reopt/CFG/LLVM.hs:493:29: error:
Ambiguous occurrence ‘withArchConstraints’
It could refer to either ‘Data.Macaw.X86.withArchConstraints’,
imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
(and originally defined in ‘Data.Macaw.Architecture.Info’)
or ‘Reopt.CFG.LLVM.withArchConstraints’,
defined at src/Reopt/CFG/LLVM.hs:393:5
|
493 | valueToLLVM ctx avmap val = withArchConstraints ctx $ do
| ^^^^^^^^^^^^^^^^^^^
src/Reopt/CFG/LLVM.hs:684:5: error:
Not in scope: data constructor ‘MkTuple’
|
684 | MkTuple fieldTypes fields -> do
| ^^^^^^^
src/Reopt/CFG/LLVM.hs:802:17: error:
Ambiguous occurrence ‘archEndianness’
It could refer to either ‘Data.Macaw.X86.archEndianness’,
imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
(and originally defined in ‘Data.Macaw.Architecture.Info’)
or ‘Reopt.CFG.LLVM.archEndianness’,
defined at src/Reopt/CFG/LLVM.hs:355:5
|
802 | req <- asks $ archEndianness . archFns
| ^^^^^^^^^^^^^^
src/Reopt/CFG/LLVM.hs:878:3: error:
Ambiguous occurrence ‘withArchConstraints’
It could refer to either ‘Data.Macaw.X86.withArchConstraints’,
imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
(and originally defined in ‘Data.Macaw.Architecture.Info’)
or ‘Reopt.CFG.LLVM.withArchConstraints’,
defined at src/Reopt/CFG/LLVM.hs:393:5
|
878 | withArchConstraints ctx m
| ^^^^^^^^^^^^^^^^^^^
src/Reopt/CFG/LLVM.hs:1253:30: error:
Ambiguous occurrence ‘withArchConstraints’
It could refer to either ‘Data.Macaw.X86.withArchConstraints’,
imported from ‘Data.Macaw.X86’ at src/Reopt/CFG/LLVM.hs:91:1-31
(and originally defined in ‘Data.Macaw.Architecture.Info’)
or ‘Reopt.CFG.LLVM.withArchConstraints’,
defined at src/Reopt/CFG/LLVM.hs:393:5
|
1253 | , withArchConstraints = \x -> x
| ^^^^^^^^^^^^^^^^^^^
cabal: Failed to build reopt-0.1.0 (which is required by exe:reopt from
reopt-0.1.0 and exe:reopt-relink from reopt-0.1.0). See the build log above
for details.
GHC version:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3
$ cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library
Example in bootctl
:
%struct.reopt.t104 = type %struct.reopt.t104*
After implementing ConstraintProvenance
in #248, @Ptival noted #248 (comment) that this results in lots of additional constraint arguments being passed around:
I think what might be nicer in the long run, to avoid all this explicit passing of provenance, would be to add a typeclass constraint
HasConstraintProvenance ctx
, s.t. more or lessHasConstraintProvenance
has one methodGetter ctx ConstraintProvenance
.That way the bottom functions get to just grab the ambient provenance.
This issue tracks implementing this idea. I responded in #248 (comment) that we would need to think a bit about the design of such a type class:
That is an intriguing idea. I'm not sure if it would be applicable in all places that we pass around constraints, however. For instance, I'm not sure what constraint we'd use for
SolverM
, which doesn't have anything likeCGenM's ctx
type parameter.
Investigate why we currently don't, fix it if we can.
The datatype Function
in Reopt.CFG.FnRep
includes a fnSize
parameter which makes the assumption that functions occupy a contiguous region of memory. This field should be eliminated, and the use of it in Relinking should be replaced with a function that correctly figures out how many bytes can be rewritten without affecting other code locations.
Hi!
Reopt looks like a really interesting project, and I'd love to get the chance to start using it and develop a further understanding of it's inner architecture and design.
I recently tried to build reopt
on one of my new laptops, and then noticed an issue that is not obvious for already configured development laptops.
The way that the submodules (of dependencies) are currently setup in reopt
requires you to use a Git SSH key, otherwise, you run into an error when running git submodule update --init
.
In particular, for all the submodules (e.g. llvm-pretty-bc-parser
, macaw
, etc), running git submodule update --init
gives the error "fatal: Could not read from remote repository. Please make sure you have correct access rights"
This is because all submodules are accessed using [email protected]:GaloisInc/foo.git
instead of e.g. https://github.com/GaloisInc/foo.git
.
While a very small issue, it does make it more difficult to get started with the project as a new user. Thus, I wanted to let you know, as this issue is not likely to turn up in the development environment of existing developers.
Cheers,
Robin
Example in x86_64.ubuntu20.anope.clang.O0.nopie.nostrip.elf
:
error: '@reopt__ZN9__gnu_cxx14__alloc_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES6_E9constructIS6_EEvRS7_PS6_RKT__0_0x407630'
defined with type 'void (i64, i64, i64)*' but expected 'void ({}*, i64, i64)*'
The error seems to arise of the conflict between the declared type of this symbol:
declare void
@reopt__ZN9__gnu_cxx14__alloc_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES6_E9constructIS6_EEvRS7_PS6_RKT__0_0x407630
(i64, i64, i64)
While we have inferred a pointer type for the value that will end up in first argument position.
We need to add support for the SSE MXCSR register. This will enable support for conversion operations such as cvtss2si
.
We should test that reopt does not report alarming errors when given simple binaires (e.g. see #17 for one example).
We should do more automated regression testing on Reopt.
I get an Expected the new object to use the same OS ABI as original
when running reopt
on ELF64
binaries on MacOS.
Specifically, according to readelf
, the input binary appears to have OS/ABI UNIX - GNU
while the output object file has UNIX - System V
.
Per an internal discussion at Galois, this check is likely unnecessary.
Fairly sure the following:
reopt/vscode-plugin/src/activity-webview/webview.tsx
Lines 108 to 119 in f4f7af7
should have a []
as second argument to not repeat the effect on state change.
Should also check in the other component that listens to messages.
We need to validate that the layout the relinker thinks it is generating the file for matches what is actually loaded by the kernel.
This includes the following information:
When we support dynamic binaries, we will have to extend this with additional features.
Following the instructions I get this cabal: The file does not exist 'exe:reopt'.
Example in bsdtar
block block_1_7d1b
:
; r11
%t11 = phi { <1 x i8>, i8 }* [ %t5, %block_1_7d14 ]
Error:
error: '%t5' defined with type 'i8*' but expected '{ <1 x i8>, i8 }*'
From reading the kernel loader code, it appears that an Elf file can only contain a single BSS section, and it must be at the end of the segment with the highest virtual file address offset. If any other segments contains contain bss regions, they will be silently dropped by the kernel.
Is there a possibility to make custom changes to the generated .ll
code and continue with the producing final binary? Specifically, I'm interested in applying AFL instrumentation. I tried to compile/link produced .ll
with clang
and got linker errors.
I looked at the source code and it seems like the original binary is used to merge .ll
into the final binary (.ll
alone cannot be used to produce the final binary). Could you please clarify how does this work or maybe point me to some documentation?
reopt --export-llvm ls.ll /bin/ls
llvm-as-8 -o ls.bc ls.ll
clang -o ls ls.bc
warning: overriding the module target triple with x86_64-pc-linux-gnu [-Woverride-module]
1 warning generated.
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
/usr/bin/ld: /tmp/ls-4f5341.o: in function `reopt_1_0xf310':
ls.ll:(.text+0x1488): undefined reference to `reopt_1_0xebd0'
/usr/bin/ld: /tmp/ls-4f5341.o: in function `reopt_1_0x13390':
ls.ll:(.text+0x1c40): undefined reference to `reopt_1_0x17340'
/usr/bin/ld: /tmp/ls-4f5341.o: in function `reopt_1_0x14af0':
ls.ll:(.text+0x1ec1): undefined reference to `reopt_1_0x14a00'
/usr/bin/ld: /tmp/ls-4f5341.o: in function `reopt_1_0x14ba0':
ls.ll:(.text+0x1ed2): undefined reference to `reopt_1_0x146c0'
/usr/bin/ld: /tmp/ls-4f5341.o: in function `reopt_1_0x14bc0':
ls.ll:(.text+0x1ee2): undefined reference to `reopt_1_0x146c0'
I am experiencing some build issues. I tried building the master branch and the jhx/new-relinker branch and am build in the Haskell:8.8.3 container. The version of cabal is 3.2.0.0 and ghc is 8.8.3. Would it be possible to make prebuilt docker images with reopt already compiled?
The use case I am researching is making llvm passes for after the binary has been lifted for adding buffer overflow checks and mitigations.
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
- reopt-0.1.0 (lib) (requires build)
- reopt-0.1.0 (exe:reopt) (requires build)
- reopt-0.1.0 (exe:reopt-relink) (requires build)
Starting reopt-0.1.0 (lib)
Building reopt-0.1.0 (lib)
Failed to build reopt-0.1.0.
Build log (
/root/.cabal/logs/ghc-8.8.3/reopt-0.1.0-3e4a2d216537bdd33630dad51c3af2b33bfedea007fbc380e75e16e76ad84dee.log
):
Configuring library for reopt-0.1.0..
Preprocessing library for reopt-0.1.0..
Building library for reopt-0.1.0..
[ 1 of 18] Compiling Reopt.Analysis.Domains.DiffEquations ( src/Reopt/Analysis/Domains/DiffEquations.hs, dist/build/Reopt/Analysis/Domains/DiffEquations.o )
[ 2 of 18] Compiling Reopt.AnnotatedTypes ( src/Reopt/AnnotatedTypes.hs, dist/build/Reopt/AnnotatedTypes.o )
[ 3 of 18] Compiling Reopt.CFG.FnRep ( src/Reopt/CFG/FnRep.hs, dist/build/Reopt/CFG/FnRep.o )
src/Reopt/CFG/FnRep.hs:263:25: error:
* Couldn't match expected type `Doc'
with actual type `prettyprinter-1.7.0:Prettyprinter.Internal.Doc
ann1'
NB: `prettyprinter-1.7.0:Prettyprinter.Internal.Doc'
is defined in `Prettyprinter.Internal'
in package `prettyprinter-1.7.0'
`Doc'
is defined in `Text.PrettyPrint.ANSI.Leijen.Internal'
in package `ansi-wl-pprint-0.6.9'
* In the expression: sexpr "read" [pretty a, pretty tp]
In a case alternative:
FnReadMem a tp -> sexpr "read" [pretty a, pretty tp]
In the expression:
case rhs of
FnSetUndefined w -> text "undef ::" <+> brackets (text (show w))
FnReadMem a tp -> sexpr "read" [pretty a, pretty tp]
FnCondReadMem _ c a d
-> sexpr "cond_read" [pretty c, pretty a, ....]
FnEvalApp a -> ppApp pretty a
FnEvalArchFn f -> runIdentity (ppArchFn (pure . pretty) f)
|
263 | FnReadMem a tp -> sexpr "read" [ pretty a, pretty tp]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Reopt/CFG/FnRep.hs:263:40: error:
* Couldn't match expected type `prettyprinter-1.7.0:Prettyprinter.Internal.Doc
ann1'
with actual type `Doc'
NB: `Doc'
is defined in `Text.PrettyPrint.ANSI.Leijen.Internal'
in package `ansi-wl-pprint-0.6.9'
`prettyprinter-1.7.0:Prettyprinter.Internal.Doc'
is defined in `Prettyprinter.Internal'
in package `prettyprinter-1.7.0'
* In the expression: pretty a
In the second argument of `sexpr', namely `[pretty a, pretty tp]'
In the expression: sexpr "read" [pretty a, pretty tp]
|
263 | FnReadMem a tp -> sexpr "read" [ pretty a, pretty tp]
| ^^^^^^^^
src/Reopt/CFG/FnRep.hs:263:50: error:
* Couldn't match expected type `prettyprinter-1.7.0:Prettyprinter.Internal.Doc
ann1'
with actual type `Doc'
NB: `Doc'
is defined in `Text.PrettyPrint.ANSI.Leijen.Internal'
in package `ansi-wl-pprint-0.6.9'
`prettyprinter-1.7.0:Prettyprinter.Internal.Doc'
is defined in `Prettyprinter.Internal'
in package `prettyprinter-1.7.0'
* In the expression: pretty tp
In the second argument of `sexpr', namely `[pretty a, pretty tp]'
In the expression: sexpr "read" [pretty a, pretty tp]
|
263 | FnReadMem a tp -> sexpr "read" [ pretty a, pretty tp]
| ^^^^^^^^^
Example in cat
block block_0_402730
:
; r0 := (0x60c288 : bv 64)
; r1 := (read r0 (bv 64))
%t0 = load { <18446744073709551615 x i8>, i8 }*, { <18446744073709551615 x i8>, i8 }** 6341256
In 'Reopt.Semantics.Implementation' we have
bvUlt x y
| Just xv <- asBVLit x, Just yv <- asBVLit y = S.boolValue (xv < yv)
| x == y = S.false
| otherwise = app $ BVUnsignedLt x y
bvSlt x y
| Just xv <- asBVLit x, Just yv <- asBVLit y = S.boolValue (xv < yv)
| x == y = S.false
| otherwise = app $ BVUnsignedLt x y
The last line should use 'BVSignedLt', not 'BVUnsignedLt', and the logic in the first case probably needs to take sign bits into account.
e.g. in x86_64.ubuntu20.dnsmasq.clang.O0.nopie.nostrip/x86_64.ubuntu20.dnsmasq.clang.O0.nopie.nostrip.elf
:
The function is defined as:
define i64 @cache_get_name({ <52 x i8>, i32, { }* }* %arg0) {
Yet, in the final block we infer a pointer type for the return value:
block_0_403d83:
; r22
%t29 = phi { }* [ %t11, %block_0_403d3d ], [ %t25, %block_0_403d61 ], [ %t28, %block_0_403d72 ]
ret { }* %t29
These are incompatible.
The implementation of exec_fst in Reopt.Semantics.Semantics does not have a mechanism for dealing with floating point exceptions. In particular, it ignore stack underflow and always assigns the rounding direction.
lld generates static executables with three segments, a read-only segment containing the elf headers and read-only data, a read-only and executable segment containing the code, and a read-write segment containing the modifiable data.
reopt currently does not support this layout in relinking, and it should be fixed.
The script support/print_startup_info/reopt_print_startup_info.sh
fails during relinking with the output
User error
Expected data segment after code segment.
The error message should be cleaned up, and the example fixed. This is likely related to #25.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.