Test source: git
Source: <stdin> ERROR: Unsupported instruction: store volatile i8 4, i8* %g, align 1 ERROR: Unsupported instruction: invoke void @_ZN1AC2Ev(i8* undef) to label %.noexc.i unwind label %lpad.i ERROR: Unsupported attribute: nofree ERROR: Unsupported attribute: nofree ---------------------------------------- define i32 @main(i32 %argc, * %argv) { %0: %c_19 = alloca i64 8, align 8 %__constexpr_2 = gep * null, 1 x i32 1 %__constexpr_1 = ptrtoint * %__constexpr_2 to i32 %__constexpr_0 = mul i32 %__constexpr_1, 10 %malloc_206 = malloc i32 %__constexpr_0 store * %malloc_206, * %c_19, align 8 %tmp_207 = load *, * %c_19, align 8 free * %tmp_207 ret i32 0 } => define i32 @main(i32 %argc, * %argv) { %0: ret i32 0 } Transformation seems to be correct! ---------------------------------------- define i32 @dead_aligned_alloc(i32 %size, i32 %alignment, i8 %value) { %0: %aligned_allocation = call * @aligned_alloc(i32 %alignment, i32 %size) store i8 %value, * %aligned_allocation, align 1 free * %aligned_allocation ret i32 0 } => define i32 @dead_aligned_alloc(i32 %size, i32 %alignment, i8 %value) { %0: ret i32 0 } Transformation doesn't verify! ERROR: Couldn't prove the correctness of the transformation Alive2 approximated the semantics of the programs and therefore we cannot conclude whether the bug found is valid or not. Approximations done: - Unknown libcall: @aligned_alloc ---------------------------------------- define i1 @foo() { %0: %m = malloc i32 1 %z = icmp eq * %m, null, use_provenance free * %m ret i1 %z } => define i1 @foo() { %0: ret i1 0 } Transformation seems to be correct! ---------------------------------------- define void @test3(* %src) { %0: %a = malloc i32 10 fillpoison * %a fillpoison * %a %size = call i64 @llvm.objectsize.i64.p0i8(* %a, i1 1, i1 0, i1 0) noread nowrite nofree store i8 42, * %a, align 1 memcpy * %a align 1, * %src align 1, i32 32 memmove * %a align 1, * %src align 1, i32 32 memset * %a align 1, i8 5, i32 32 %alloc2 = calloc i32 5, i32 7 %z = icmp ne * %alloc2, null, use_provenance ret void } => define void @test3(* %src) { %0: ret void } Transformation seems to be correct! ---------------------------------------- define void @test4() { %0: %A = malloc i32 16000 %B = bitcast * %A to * %C = bitcast * %B to * free * %C ret void } => define void @test4() { %0: ret void } Transformation seems to be correct! ERROR: Unsupported instruction: store volatile i8 4, i8* %g, align 1 ---------------------------------------- define void @test6(* %foo) { %entry: %tobool = icmp eq * %foo, null br i1 %tobool, label %if.end, label %if.then %if.then: free * %foo br label %if.end %if.end: ret void } => define void @test6(* %foo) { %entry: %tobool = icmp eq * %foo, null free * %foo br i1 %tobool, label %if.end, label %if.then %if.then: br label %if.end %if.end: ret void } Transformation doesn't verify! ERROR: Source is more defined than target Example: * %foo = pointer(non-local, block_id=1, offset=-4) Source: i1 %tobool = #x1 (1) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 address: 0 Block 1 > size: 8 align: 4 alloc type: 0 address: 4 Target: i1 %tobool = #x1 (1) ------------------- SMT STATS ------------------- Num queries: 9 Num invalid: 0 Num skips: 0 Num trivial: 31 (77.5%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 8 (88.9%) Num UNSAT: 1 (11.1%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -instcombine -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/malloc-free-delete.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/malloc-free-delete.ll