[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug] Timer bugs in hw/m48t59.c?
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [Bug] Timer bugs in hw/m48t59.c? |
Date: |
Thu, 22 Mar 2007 21:42:25 +0100 |
User-agent: |
IceDove 1.5.0.10 (X11/20070307) |
Hi,
could SPARC or PPC users please check whether the timer code
in hw/m48t59.c is really correct?
I expect a crash in qemu_mod_timer after wd_timer = NULL and
a call to qemu_mod_timer with this NULL value.
The same applies to alrm_timer.
I wrote a quick-and-dirty patch, but think that even more
old code could be removed.
Stefan
diff -u -b -B -r1.8 m48t59.c
--- hw/m48t59.c 14 Jun 2006 12:41:34 -0000 1.8
+++ hw/m48t59.c 22 Mar 2007 20:29:15 -0000
@@ -155,7 +155,6 @@
NVRAM->alarm = mktime(tm);
if (NVRAM->alrm_timer != NULL) {
qemu_del_timer(NVRAM->alrm_timer);
- NVRAM->alrm_timer = NULL;
}
if (NVRAM->alarm - time(NULL) > 0)
qemu_mod_timer(NVRAM->alrm_timer, NVRAM->alarm * 1000);
@@ -184,7 +183,6 @@
if (NVRAM->wd_timer != NULL) {
qemu_del_timer(NVRAM->wd_timer);
- NVRAM->wd_timer = NULL;
}
NVRAM->buffer[0x1FF0] &= ~0x80;
if (value != 0) {
- [Qemu-devel] [Bug] Timer bugs in hw/m48t59.c?,
Stefan Weil <=