Hi, I have been building a game with odin and I encountered a bug with the llvm backend while I was refactoring my code. Unfortunately I have been unable to track the exact cause of the crash yet as I made many changes to my code before recompiling. I did walk through the crash in my debugger and found the exact line that crashes is llvm_backend.cpp:2615, which means that I get no error message because the compiler crashes before it prints anything out. I am unsure what to do as a next step.
#LLVM ReadAccessViolation when calling LLVMTargetMachineEmitToFile
1 messages · Page 1 of 1 (latest)
What platform are you on?
I'm on windows x86_64
@simple saffron I did some experimenting this morning and I found a way to repro the bug reliably.
package repro
import "core:fmt"
foo: [65536]u8 = foo_init()
foo_init :: proc() -> [65536]u8 {
return {}
}
foo_deinit :: proc(state: ^[65536]u8) {}
main :: proc() {
fmt.print("Found the bug!")
foo_deinit(&foo)
}
Thank you!
Not sure if you'd prefer me to make an issue on git. I just thought I could share that the snippet to make testing easier