prosyslab-classroom / cs348-information-security

62 stars 10 forks source link

[Question][Hw3,4] PHI node entries do not match predecessors! #106

Closed ktkim closed 3 years ago

ktkim commented 3 years ago

I tested the source code in HW3. I got this error. (I commited the code in the HW3) Could you tell me the what the wrong is.

PHI node entries do not match predecessors! %c.0 = phi i32 [ %div, %if.then ], [ %div1, %if.else ], !dbg !23 label %if.then label %0 Instruction does not dominate all uses! %div = sdiv i32 30, %a, !dbg !18 %c.0 = phi i32 [ %div, %if.then ], [ %div1, %if.else ], !dbg !23 Instruction does not dominate all uses! %div1 = sdiv i32 40, %a, !dbg !21 %c.0 = phi i32 [ %div, %if.then ], [ %div1, %if.else ], !dbg !23 fatal error: error in backend: Broken module found, compilation aborted! clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 10.0.0-4ubuntu1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the cras\ h backtrace, preprocessed source, and associated run script. clang: note: diagnostic msg: ****
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/runtime-e65107.c
clang: note: diagnostic msg: /tmp/runtime-e65107.sh
clang: note: diagnostic msg:
****

make: *** [Makefile:17: example3.ll] Error 70

RiceBiscuits commented 3 years ago

I think you used build_* functions of LLVM in an inappropriate way. Please see your example3.instrumented.ll file and check the IR is created what you intended.

ktkim commented 3 years ago

Thank you. Closed