commit 327d40e7a3cd67e2f4fbe3af226d4bc6860f6f68 (tree)
parent ab4ea5d3cf5a96cd596df14515521843ca4dccad
Author: LemonBoy <thatlemon@gmail.com>
Date: Wed, 12 Feb 2020 23:10:08 +0100
Fix a UAF when verbose-llvm-ir is specified
The g->module is long gone when codegen_link is called.
Diffstat:
1 file changed, 0 insertions(+), 7 deletions(-)
diff --git a/src/link.cpp b/src/link.cpp
@@ -2642,13 +2642,6 @@ void codegen_link(CodeGen *g) {
lj.rpath_table.init(4);
lj.codegen = g;
- if (g->verbose_llvm_ir) {
- fprintf(stderr, "\nOptimization:\n");
- fprintf(stderr, "---------------\n");
- fflush(stderr);
- LLVMDumpModule(g->module);
- }
-
if (g->out_type == OutTypeObj) {
lj.args.append("-r");
}