Re: [Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-15 Thread Markus Armbruster
Blue Swirl writes: > On 3/15/10, Markus Armbruster wrote: >> Blue Swirl writes: >> >> > When building with -DNDEBUG, assert(0) will not stop execution >> > so it must not be used for abnormal termination. >> >> >> For each case: are you sure the code does not recover after assert(0)? >> Not

Re: [Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-15 Thread Blue Swirl
On 3/15/10, Markus Armbruster wrote: > Blue Swirl writes: > > > When building with -DNDEBUG, assert(0) will not stop execution > > so it must not be used for abnormal termination. > > > For each case: are you sure the code does not recover after assert(0)? > Not saying it does, just asking whe

Re: [Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-15 Thread Markus Armbruster
Blue Swirl writes: > When building with -DNDEBUG, assert(0) will not stop execution > so it must not be used for abnormal termination. For each case: are you sure the code does not recover after assert(0)? Not saying it does, just asking whether you checked. > Use cpu_abort() when in CPU contex

Re: [Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-13 Thread Edgar E. Iglesias
On Sat, Mar 13, 2010 at 04:56:03PM +0200, Blue Swirl wrote: > When building with -DNDEBUG, assert(0) will not stop execution > so it must not be used for abnormal termination. > > Use cpu_abort() when in CPU context, abort() otherwise. > > Signed-off-by: Blue Swirl The CRIS parts look good, tha

[Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-13 Thread Blue Swirl
When building with -DNDEBUG, assert(0) will not stop execution so it must not be used for abnormal termination. Use cpu_abort() when in CPU context, abort() otherwise. Signed-off-by: Blue Swirl --- block/vvfat.c | 20 ++-- hw/sh7750.c | 30 +