Re: [Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-07 Thread Lidong Chen
Hi Philippe, On 6/6/2019 4:18 PM, Philippe Mathieu-Daudé wrote: On 6/5/19 9:15 PM, Lidong Chen wrote: The check for poll_fds in g_assert() was incorrect. The correct assertion should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the subsequent for-loop is doing access to poll_fds[

Re: [Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-06 Thread Philippe Mathieu-Daudé
On 6/5/19 9:15 PM, Lidong Chen wrote: > The check for poll_fds in g_assert() was incorrect. The correct assertion > should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the > subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i > is in [0, w->num). > > Signed-off-b

Re: [Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-05 Thread Markus Armbruster
You neglected to cc: the file's maintainer. I'm doing that for you now. In the future, use scripts/get_maintainer.pl to find maintainers you might want to cc:. Lidong Chen writes: > The check for poll_fds in g_assert() was incorrect. The correct assertion > should check "n_poll_fds + w->num <=

[Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-05 Thread Lidong Chen
The check for poll_fds in g_assert() was incorrect. The correct assertion should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i is in [0, w->num). Signed-off-by: Lidong Chen Suggested-by: Peter Maydell Sugge

Re: [Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-05 Thread Lidong Chen
On 6/5/2019 1:57 AM, Philippe Mathieu-Daudé wrote: This patch doesn't seem related to the series cover. I will resent the patch to include more details to the cover. On 6/5/19 8:21 AM, Lidong Chen wrote: The check for poll_fds in g_assert() was incorrect. The correct assertion should check

Re: [Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-05 Thread Philippe Mathieu-Daudé
This patch doesn't seem related to the series cover. On 6/5/19 8:21 AM, Lidong Chen wrote: > The check for poll_fds in g_assert() was incorrect. The correct assertion > should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the > subsequent for-loop is doing access to poll_fds[n_poll_f

Re: [Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-04 Thread Li Qiang
Lidong Chen 于2019年6月5日周三 下午2:23写道: > The check for poll_fds in g_assert() was incorrect. The correct assertion > should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the > subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i > is in [0, w->num). > > Signed-off-by:

[Qemu-devel] [Qemu-devel PATCH v2 2/2] util/main-loop: Fix incorrect assertion

2019-06-04 Thread Lidong Chen
The check for poll_fds in g_assert() was incorrect. The correct assertion should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i is in [0, w->num). Signed-off-by: Lidong Chen Reviewed-by: Liran Alon Reviewed-