On Wed, Aug 07, 2013 at 04:17:29PM +0800, Amos Kong wrote:
> BTW, can we add a check in quit_timers() to avoid one kind of crash
> (try to quit the uninited timers, or quit timer repeatedly) ?
>
>
> diff --git a/qemu-timer.c b/qemu-timer.c
> index b2d95e2..023e4ae 100644
> --- a/qemu-timer.c
> ++
On Wed, Aug 07, 2013 at 09:57:19AM +0200, Stefan Hajnoczi wrote:
> On Wed, Aug 07, 2013 at 08:39:19AM +0200, Laszlo Ersek wrote:
> > On 08/07/13 01:29, Amos Kong wrote:
> > > We register exit clean function by atexit(),
> > > but alarm_timer is NULL here. If exit is caused
> > > between atexit() an
On Wed, Aug 07, 2013 at 08:39:19AM +0200, Laszlo Ersek wrote:
> On 08/07/13 01:29, Amos Kong wrote:
> > We register exit clean function by atexit(),
> > but alarm_timer is NULL here. If exit is caused
> > between atexit() and alarm_timer assignment,
> > real timer can't be cleaned.
>
> That's corr
On 08/07/13 01:29, Amos Kong wrote:
> We register exit clean function by atexit(),
> but alarm_timer is NULL here. If exit is caused
> between atexit() and alarm_timer assignment,
> real timer can't be cleaned.
That's correct in general, but I don't see how it could happen in the
code being patche
We register exit clean function by atexit(),
but alarm_timer is NULL here. If exit is caused
between atexit() and alarm_timer assignment,
real timer can't be cleaned. So move alarm_timer
assignment before atexit().
Signed-off-by: Amos Kong
---
qemu-timer.c | 2 +-
1 file changed, 1 insertion(+),