Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-05-16 Thread Michael Tokarev
17.05.2023 09:35, Thomas Huth wrote: .. I think this should also go into the next stable release (now on CC:), we're already getting bug reports about this:  https://gitlab.com/qemu-project/qemu/-/issues/1655 Yes, I already picked that one up after noticing win32/win64 CI build failures. T

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-05-16 Thread Thomas Huth
On 20/04/2023 22.29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 |

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-28 Thread Paolo Bonzini
Il ven 28 apr 2023, 18:25 Juan Quintela ha scritto: > > On the other hand, if the pointer to the heap-allocated BHListSlice > > escaped, this would be a dangling pointer as well—just not the kind that > > the new GCC warning can report. > > I don't agree here. > If with my patch it becomes a dang

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-28 Thread Juan Quintela
Paolo Bonzini wrote: > Il mar 25 apr 2023, 15:31 Daniel P. Berrangé ha > scritto: > >> > > -BHListSlice slice; >> > > +/* >> > > + * gcc13 complains about putting a local variable >> > > + * in a global list, so put it on the heap. >> > > + */ >> > > +g_autofree BHListSlic

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-28 Thread Paolo Bonzini
Il mar 25 apr 2023, 15:31 Daniel P. Berrangé ha scritto: > > > -BHListSlice slice; > > > +/* > > > + * gcc13 complains about putting a local variable > > > + * in a global list, so put it on the heap. > > > + */ > > > +g_autofree BHListSlice *slice = g_new(BHListSlice, 1);

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-28 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-25 Thread Daniel P . Berrangé
On Tue, Apr 25, 2023 at 02:24:59PM +0100, Daniel P. Berrangé wrote: > On Tue, Apr 25, 2023 at 03:22:15PM +0200, Juan Quintela wrote: > > Cédric Le Goater wrote: > > > From: Cédric Le Goater > > > > > > GCC13 reports an error : > > > > > > ../util/async.c: In function ‘aio_bh_poll’: > > > include/

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-25 Thread Daniel P . Berrangé
On Tue, Apr 25, 2023 at 03:22:15PM +0200, Juan Quintela wrote: > Cédric Le Goater wrote: > > From: Cédric Le Goater > > > > GCC13 reports an error : > > > > ../util/async.c: In function ‘aio_bh_poll’: > > include/qemu/queue.h:303:22: error: storing the address of local > > variable ‘slice’ in ‘*c

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-25 Thread Juan Quintela
Cédric Le Goater wrote: > From: Cédric Le Goater > > GCC13 reports an error : > > ../util/async.c: In function ‘aio_bh_poll’: > include/qemu/queue.h:303:22: error: storing the address of local > variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ > [-Werror=dangling-pointer=] > 303 | (head)->

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-23 Thread Cédric Le Goater
On 4/24/23 08:33, Thomas Huth wrote: On 20/04/2023 22.29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-W

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-23 Thread Thomas Huth
On 20/04/2023 22.29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 |

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-22 Thread Stefan Hajnoczi
On Thu, 20 Apr 2023 at 16:31, Cédric Le Goater wrote: > > From: Cédric Le Goater > > GCC13 reports an error : > > ../util/async.c: In function ‘aio_bh_poll’: > include/qemu/queue.h:303:22: error: storing the address of local variable > ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-p

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 22:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 | (he

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Daniel Henrique Barboza
On 4/20/23 18:07, Daniel Henrique Barboza wrote: On 4/20/23 17:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Daniel Henrique Barboza
On 4/20/23 17:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 |

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Cédric Le Goater
+ Φλ On 4/20/23 22:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 |

[PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Cédric Le Goater
From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 | (head)->sqh_last = &(elm)->field.sqe_next;