Test Failure: Transforms/DeadStoreElimination/free.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. DSEPass

----------------------------------------
declare void @free(nocapture ptr) allockind(free)

define void @test(ptr %Q, ptr %P) {
#0:
  %DEAD = load i32, ptr %Q, align 4
  store i32 %DEAD, ptr %P, align 4
  tail call void @free(nocapture noundef allocptr ptr %P) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. DSEPass

----------------------------------------
declare void @free(nocapture ptr) allockind(free)

define void @test(ptr %Q, ptr %P) {
#0:
  %DEAD = load i32, ptr %Q, align 4
  store i32 %DEAD, ptr %P, align 4
  tail call void @free(nocapture noundef allocptr ptr %P) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite)
  ret void
}
=>
declare void @free(nocapture ptr) allockind(free)

define void @test(ptr %Q, ptr %P) {
#0:
  tail call void @free(nocapture noundef allocptr ptr %P) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite)
  ret void
}
Transformation seems to be correct!

-- 4. PassManager<Function> : Skipping NOP
-- 5. PassManager<Function> : Skipping NOP
-- 6. DSEPass

----------------------------------------
declare void @free(nocapture ptr) allockind(free)

define void @test2(ptr %P) {
#0:
  %Q = gep ptr %P, 8 x i32 0, 1 x i64 4
  store i32 4, ptr %Q, align 4
  tail call void @free(nocapture noundef allocptr ptr %P) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 7. DSEPass

----------------------------------------
declare void @free(nocapture ptr) allockind(free)

define void @test2(ptr %P) {
#0:
  %Q = gep ptr %P, 8 x i32 0, 1 x i64 4
  store i32 4, ptr %Q, align 4
  tail call void @free(nocapture noundef allocptr ptr %P) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite)
  ret void
}
=>
declare void @free(nocapture ptr) allockind(free)

define void @test2(ptr %P) {
#0:
  tail call void @free(nocapture noundef allocptr ptr %P) nothrow willreturn alloc-family(malloc) allockind(free) memory(inaccessiblemem: readwrite)
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Mismatch in memory

Example:
ptr %P = pointer(non-local, block_id=1, offset=-1) / Address=#x000

Source:
ptr %Q = pointer(non-local, block_id=1, offset=3) / Address=#x004
Function @free returned

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 4	alloc type: 0	alive: false	address: #x000
Block 1 >	size: 12	align: 1	alloc type: 0	alive: true	address: #x001

LOCAL BLOCKS:
Block 2 >	size: 0	align: 4	alloc type: 0	alive: false	address: #x000

Target:
Function @free returned

TARGET MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 4	alloc type: 0	alive: false	address: #x000
Block 1 >	size: 12	align: 1	alloc type: 0	alive: true	address: #x001

LOCAL BLOCKS:
Block 2 >	size: 0	align: 4	alloc type: 0	alive: false	address: #x000

Mismatch in pointer(non-local, block_id=1, offset=0)
Source value: #x00000004
Target value: poison

Pass: DSEPass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=dse' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_4oT6F2La_3Hy8.bc"

------------------- SMT STATS -------------------
Num queries: 26
Num invalid: 0
Num skips:   0
Num trivial: 12 (31.6%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     19 (73.1%)
Num UNSAT:   7 (26.9%)
Alive2: Transform doesn't verify; aborting!

stderr:

Transforms/DeadStoreElimination/free.ll' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/free.ll -passes=dse -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/free.ll
# executed command: /home/nlopes/alive2/build/opt-alive.sh -passes=dse -S
# .---command stderr------------
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/free.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/free.ll
# `-----------------------------
# error: command failed with exit status: 2

--

 

<-- Back