Closed MrSmith33 closed 2 years ago
The actual issue was that eax wasn't added to the argument list of the syscall instruction causing incorrect liveness analysis and as a result incorrect register allocation, leading to overwrite of the value.
Fixed by 28c386a0c89afe9f0fa476d2ef9b27fb6cadd3a5
@rempas, this issue should be fixed now, I verified it on my machine.
Unfortunately it seems that this problem has not been fixed yet. The wrapper in the "exit" system call results in the same error. The code:
@extern(syscall, 60)
void sys_exit(u64 code);
void exit(u64 code) {
exit(code);
}
void main() {
exit(0);
}
You have infinite recursion here with exit
function
Oh, I'm so sorry! Well you see I was coding continuously for about an hour and it seems I'm not used to it. Don't hesitate to call me blind the next time tho, maybe this will help me to double check first...
Discussed in https://github.com/MrSmith33/vox/discussions/29