authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-02-12 23:10:08+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-02-12 23:10:08+01:00
log327d40e7a3cd67e2f4fbe3af226d4bc6860f6f68
tree12636697e1d422b3737d830c9e1e8dd1bb12a3d0
parentab4ea5d3cf5a96cd596df14515521843ca4dccad

Fix a UAF when verbose-llvm-ir is specified

The g->module is long gone when codegen_link is called.

1 files changed, 0 insertions(+), 7 deletions(-)

src/link.cpp-7
......@@ -2642,13 +2642,6 @@ void codegen_link(CodeGen *g) {
26422642 lj.rpath_table.init(4);
26432643 lj.codegen = g;
26442644
2645 if (g->verbose_llvm_ir) {
2646 fprintf(stderr, "\nOptimization:\n");
2647 fprintf(stderr, "---------------\n");
2648 fflush(stderr);
2649 LLVMDumpModule(g->module);
2650 }
2651
26522645 if (g->out_type == OutTypeObj) {
26532646 lj.args.append("-r");
26542647 }