changeset 160:69ac23d42897

Fix crash in printf from "crash" function due to lack of clearing rax
author Mike Pavone <pavone@retrodev.com>
date Sat, 05 Jan 2013 01:32:40 -0800
parents c1530501c215
children 6748022656b7
files runtime.S
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runtime.S	Sat Jan 05 01:31:28 2013 -0800
+++ b/runtime.S	Sat Jan 05 01:32:40 2013 -0800
@@ -286,6 +286,7 @@
 crash:
 	mov %edi, %esi
 	lea bad_access_msg(%rip), %rdi
+	xor %rax, %rax
 	call printf
 	mov $1, %rdi
 	call exit