Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Daniel P . Berrangé
On Mon, Jun 03, 2024 at 06:46:15PM +0100, Alex Bennée wrote: > Daniel P. Berrangé writes: > > > On Mon, Jun 03, 2024 at 03:47:55PM +0100, Alex Bennée wrote: > >> Thomas Huth writes: > >> > >> > Casting function pointers from one type to another causes undefined > >> > behavior errors when

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, Jun 03, 2024 at 03:47:55PM +0100, Alex Bennée wrote: >> Thomas Huth writes: >> >> > Casting function pointers from one type to another causes undefined >> > behavior errors when compiling with -fsanitize=undefined with Clang >> > v18: >> >> Queued to

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Thomas Huth
On 03/06/2024 17.52, Daniel P. Berrangé wrote: On Mon, Jun 03, 2024 at 04:12:34PM +0100, Peter Maydell wrote: On Mon, 3 Jun 2024 at 15:58, Peter Maydell wrote: On Mon, 3 Jun 2024 at 15:49, Daniel P. Berrangé wrote: We can't rely on the sanitizers to catch all cases where we're casting

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Daniel P . Berrangé
On Mon, Jun 03, 2024 at 04:12:34PM +0100, Peter Maydell wrote: > On Mon, 3 Jun 2024 at 15:58, Peter Maydell wrote: > > > > On Mon, 3 Jun 2024 at 15:49, Daniel P. Berrangé wrote: > > > We can't rely on the sanitizers to catch all cases where we're casting > > > functions, as we don't have good

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Peter Maydell
On Mon, 3 Jun 2024 at 15:58, Peter Maydell wrote: > > On Mon, 3 Jun 2024 at 15:49, Daniel P. Berrangé wrote: > > We can't rely on the sanitizers to catch all cases where we're casting > > functions, as we don't have good enough code coverage in tests to > > identify all places that way. > > > >

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Peter Maydell
On Mon, 3 Jun 2024 at 15:49, Daniel P. Berrangé wrote: > We can't rely on the sanitizers to catch all cases where we're casting > functions, as we don't have good enough code coverage in tests to > identify all places that way. > > Unless there's a warning flag we can use to get diagnosis of this

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Daniel P . Berrangé
On Mon, Jun 03, 2024 at 03:47:55PM +0100, Alex Bennée wrote: > Thomas Huth writes: > > > Casting function pointers from one type to another causes undefined > > behavior errors when compiling with -fsanitize=undefined with Clang > > v18: > > Queued to testing/next, thanks. Please remove, as I

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Daniel P . Berrangé
On Mon, Jun 03, 2024 at 04:38:53PM +0200, Thomas Huth wrote: > On 03/06/2024 14.48, Daniel P. Berrangé wrote: > > On Wed, May 29, 2024 at 02:53:37PM +0100, Peter Maydell wrote: > > > On Wed, 29 May 2024 at 14:32, Thomas Huth wrote: > > > > > > > > Casting function pointers from one type to

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Alex Bennée
Thomas Huth writes: > Casting function pointers from one type to another causes undefined > behavior errors when compiling with -fsanitize=undefined with Clang > v18: Queued to testing/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Thomas Huth
On 03/06/2024 14.48, Daniel P. Berrangé wrote: On Wed, May 29, 2024 at 02:53:37PM +0100, Peter Maydell wrote: On Wed, 29 May 2024 at 14:32, Thomas Huth wrote: Casting function pointers from one type to another causes undefined behavior errors when compiling with -fsanitize=undefined with

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-06-03 Thread Daniel P . Berrangé
On Wed, May 29, 2024 at 02:53:37PM +0100, Peter Maydell wrote: > On Wed, 29 May 2024 at 14:32, Thomas Huth wrote: > > > > Casting function pointers from one type to another causes undefined > > behavior errors when compiling with -fsanitize=undefined with Clang v18: > > > > $

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-05-29 Thread Peter Maydell
On Wed, 29 May 2024 at 14:32, Thomas Huth wrote: > > Casting function pointers from one type to another causes undefined > behavior errors when compiling with -fsanitize=undefined with Clang v18: > > $ QTEST_QEMU_BINARY=./qemu-system-mips64 tests/qtest/netdev-socket > TAP version 13 > # random

Re: [PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-05-29 Thread Philippe Mathieu-Daudé
On 29/5/24 15:31, Thomas Huth wrote: Casting function pointers from one type to another causes undefined behavior errors when compiling with -fsanitize=undefined with Clang v18: $ QTEST_QEMU_BINARY=./qemu-system-mips64 tests/qtest/netdev-socket TAP version 13 # random seed:

[PATCH] io/channel-socket: Fix -fsanitize=undefined problem with latest Clang

2024-05-29 Thread Thomas Huth
Casting function pointers from one type to another causes undefined behavior errors when compiling with -fsanitize=undefined with Clang v18: $ QTEST_QEMU_BINARY=./qemu-system-mips64 tests/qtest/netdev-socket TAP version 13 # random seed: R02S4424f4f460de783fdd3d72c5571d3adc 1..10 # Start of