[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently |
Date: |
Fri, 29 May 2009 04:05:55 -0500 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090409) |
Kevin Wolf wrote:
> Since recently qemu_malloc behaves differently from malloc with size =
> 0. This isn't allowed any more with qemu_malloc. So you need to check
> for pattern_count == 0 and either print an error message or malloc a
> different size, e.g. 1. I'm sure we don't want qemu-io to abort() in
> such a case.
>
> Or we could start over with a lengthy discussion about fixing qemu_malloc...
>
Having qemu_malloc(0) abort is silly. Returning NULL or returning
malloc(1) are both reasonable options.
Putting the abort() in there is going to introduce a ton of subtle bugs,
I vote for changing qemu_malloc() to have a sane behavior.
Regards,
Anthony Liguori
> Kevin
>
>
>
- [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Jean-Christophe Dubois, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Kevin Wolf, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently,
Anthony Liguori <=
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, malc, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Kevin Wolf, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, malc, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Kevin Wolf, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, malc, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Kevin Wolf, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Anthony Liguori, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, malc, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Kevin Wolf, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Anthony Liguori, 2009/05/29