Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Cédric Le Goater
On 04/26/2017 04:43 AM, David Gibson wrote: > On Tue, Apr 25, 2017 at 04:06:17PM +0200, Cédric Le Goater wrote: >> On 04/25/2017 03:31 PM, Peter Maydell wrote: >>> On 25 April 2017 at 07:51, Cédric Le Goater wrote: Currenlty, the code relies on the fact that open() handles NULL filenames

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Cédric Le Goater
On 04/26/2017 04:42 AM, David Gibson wrote: > On Tue, Apr 25, 2017 at 08:51:41AM +0200, Cédric Le Goater wrote: >> Currenlty, the code relies on the fact that open() handles NULL >> filenames but that can cause an error with new clang: >> >> hw/core/loader.c:67:15: runtime error: null pointer pas

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread David Gibson
On Tue, Apr 25, 2017 at 04:06:17PM +0200, Cédric Le Goater wrote: > On 04/25/2017 03:31 PM, Peter Maydell wrote: > > On 25 April 2017 at 07:51, Cédric Le Goater wrote: > >> Currenlty, the code relies on the fact that open() handles NULL > >> filenames but that can cause an error with new clang: >

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread David Gibson
On Tue, Apr 25, 2017 at 08:51:41AM +0200, Cédric Le Goater wrote: > Currenlty, the code relies on the fact that open() handles NULL > filenames but that can cause an error with new clang: > > hw/core/loader.c:67:15: runtime error: null pointer passed as argument 1, > which is declared to never

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Cédric Le Goater
On 04/25/2017 03:31 PM, Peter Maydell wrote: > On 25 April 2017 at 07:51, Cédric Le Goater wrote: >> Currenlty, the code relies on the fact that open() handles NULL >> filenames but that can cause an error with new clang: >> >> hw/core/loader.c:67:15: runtime error: null pointer passed as argume

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Peter Maydell
On 25 April 2017 at 07:51, Cédric Le Goater wrote: > Currenlty, the code relies on the fact that open() handles NULL > filenames but that can cause an error with new clang: > > hw/core/loader.c:67:15: runtime error: null pointer passed as argument 1, > which is declared to never be null This

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename

2017-04-25 Thread Eric Blake
On 04/25/2017 01:51 AM, Cédric Le Goater wrote: > Currenlty, the code relies on the fact that open() handles NULL > filenames but that can cause an error with new clang: POSIX doesn't require it to work. Linux is nice and gives you EFAULT, but there are systems where open(NULL) crashes with SIGSEG