diff mbox series

[3/5] .gitlab-ci.d/buildtest.yml: Use -fno-sanitize=function in the clang-system job

Message ID 20240601070543.37786-4-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series tests: Update Fedora and Alpine containers via lcitool | expand

Commit Message

Thomas Huth June 1, 2024, 7:05 a.m. UTC
The latest version of Clang (version 18 from Fedora 40) now reports
bad function pointer casts as undefined behavior. Unfortunately, we are
still doing this in quite a lot of places in the QEMU code and some of
them are not easy to fix. So for the time being, temporarily switch this
off in the failing clang-system job until all spots in the QEMU sources
have been tackled.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.d/buildtest.yml | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel P. Berrangé June 3, 2024, 9:34 a.m. UTC | #1
On Sat, Jun 01, 2024 at 09:05:41AM +0200, Thomas Huth wrote:
> The latest version of Clang (version 18 from Fedora 40) now reports
> bad function pointer casts as undefined behavior. Unfortunately, we are
> still doing this in quite a lot of places in the QEMU code and some of
> them are not easy to fix. So for the time being, temporarily switch this
> off in the failing clang-system job until all spots in the QEMU sources
> have been tackled.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  .gitlab-ci.d/buildtest.yml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
> index 91c57efded..0eec570310 100644
> --- a/.gitlab-ci.d/buildtest.yml
> +++ b/.gitlab-ci.d/buildtest.yml
> @@ -432,6 +432,7 @@ clang-system:
>      IMAGE: fedora
>      CONFIGURE_ARGS: --cc=clang --cxx=clang++
>        --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
> +      --extra-cflags=-fno-sanitize=function
>      TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
>      MAKE_CHECK_ARGS: check-qtest check-tcg

I think we have a gitlab issue for the functio ncast problems - good
to have a comment linking to those, to remind us to remove -fno-sanitize
when they're fixed.

Regardless

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
diff mbox series

Patch

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 91c57efded..0eec570310 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -432,6 +432,7 @@  clang-system:
     IMAGE: fedora
     CONFIGURE_ARGS: --cc=clang --cxx=clang++
       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
+      --extra-cflags=-fno-sanitize=function
     TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
     MAKE_CHECK_ARGS: check-qtest check-tcg