rzo1 opened a new pull request, #9187: URL: https://github.com/apache/storm/pull/9187
## What is the purpose of the change The CI runners moved to a toolchain with gcc 15 and glibc 2.43, and the native `worker-launcher` build in storm-core now fails, e.g. on #9186 and #9153: ``` impl/oci/oci.c:711:19: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] ``` In C23 mode, glibc 2.43 makes `strrchr` return a `const` pointer for a `const` argument. This makes `dir_end` a `const char*`; it is only used for pointer arithmetic. While at it, the launcher and its test now also build with `-O2`, which reported further warnings: - `setuid`/`setgid` results in `main.c` are checked; a failure stops with `SETUID_OPER_FAILED`, as `change_user` in `worker-launcher.c` already does. - `strncpy` calls that copy exactly `strlen` bytes into a zeroed buffer are now `memcpy` (`-Wstringop-truncation`). - `desc` in `cleanup_oci_container_by_id` was used uninitialized when the first `strdup` failed, because the `goto` jumped over its declaration. - The test checks the results of `system` and `seteuid`. ## How was the change tested Built with the same flags as `compile-worker-launcher.sh` (`CFLAGS=-DEXEC_CONF_DIR=/etc/storm`) and ran `make check` as a non-root user: - Ubuntu 26.04, gcc 15.2.0, glibc 2.43: master fails to compile; with this change the build and `make check` pass at `-O0` and `-O2`. - Ubuntu 24.04, gcc 13.3.0, glibc 2.39: build and `make check` pass, same as master. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
