Fix the soundness bug in the representation of extern types #5021
+72
−51
Cirrus CI / nightly freebsd-15 i686
failed
Mar 16, 2026 in 1m 19s
Task Summary
Instruction test failed in 00:49
Details
✅ 00:10 clone
✅ 00:17 setup
❌ 00:49 test
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_i686_unknown_freebsd
CFLAGS_i686_unknown_freebsd = None
cargo:rerun-if-env-changed=CFLAGS_i686-unknown-freebsd
CFLAGS_i686-unknown-freebsd = None
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:18666:57: error: invalid application of 'sizeof' to an incomplete type 'DIR' (aka 'struct _dirdesc')
cargo:warning= 18666 | CTEST_EXTERN uint64_t ctest_size_of__DIR(void) { return sizeof(DIR); }
cargo:warning= | ^ ~~~~~
cargo:warning=/usr/include/dirent.h:84:8: note: forward declaration of 'struct _dirdesc'
cargo:warning= 84 | struct _dirdesc;
cargo:warning= | ^
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:18667:58: error: invalid application of 'alignof' to an incomplete type 'DIR' (aka 'struct _dirdesc')
cargo:warning= 18667 | CTEST_EXTERN uint64_t ctest_align_of__DIR(void) { return CTEST_ALIGNOF(DIR); }
cargo:warning= | ^~~~~~~~~~~~~~~~~~
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:128:30: note: expanded from macro 'CTEST_ALIGNOF'
cargo:warning= 128 | #define CTEST_ALIGNOF(T) _Alignof(T)
cargo:warning= | ^ ~~~
cargo:warning=/usr/include/dirent.h:84:8: note: forward declaration of 'struct _dirdesc'
cargo:warning= 84 | struct _dirdesc;
cargo:warning= | ^
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:39519:35: error: invalid application of 'sizeof' to an incomplete type 'DIR' (aka 'struct _dirdesc')
cargo:warning= 39519 | const uint8_t is_padding_byte[sizeof(DIR)],
cargo:warning= | ^ ~~~~~
cargo:warning=/usr/include/dirent.h:84:8: note: forward declaration of 'struct _dirdesc'
cargo:warning= 84 | struct _dirdesc;
cargo:warning= | ^
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:39520:25: error: invalid application of 'sizeof' to an incomplete type 'DIR' (aka 'struct _dirdesc')
cargo:warning= 39520 | uint8_t value_bytes[sizeof(DIR)]
cargo:warning= | ^ ~~~~~
cargo:warning=/usr/include/dirent.h:84:8: note: forward declaration of 'struct _dirdesc'
cargo:warning= 84 | struct _dirdesc;
cargo:warning= | ^
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:39518:9: error: variable has incomplete type 'DIR' (aka 'struct _dirdesc')
cargo:warning= 39518 | DIR value,
cargo:warning= | ^
cargo:warning=/usr/include/dirent.h:84:8: note: forward declaration of 'struct _dirdesc'
cargo:warning= 84 | struct _dirdesc;
cargo:warning= | ^
cargo:warning=/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c:39522:21: error: invalid application of 'sizeof' to an incomplete type 'DIR' (aka 'struct _dirdesc')
cargo:warning= 39522 | int size = (int)sizeof(DIR);
cargo:warning= | ^ ~~~~~
cargo:warning=/usr/include/dirent.h:84:8: note: forward declaration of 'struct _dirdesc'
cargo:warning= 84 | struct _dirdesc;
cargo:warning= | ^
cargo:warning=6 errors generated.
--- stderr
error occurred in cc-rs: command did not execute successfully (status code exit status: 1): LC_ALL="C" "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m32" "--target=i686-unknown-freebsd" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-Wno-type-limits" "-Wno-address-of-packed-member" "-Wno-unknown-warning-option" "-Wno-deprecated-declarations" "-D_WITH_CPU_SET_T" "-D_WITH_GETLINE" "-D_WANT_FREEBSD11_STAT" "-o" "/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/4492516b7a22cc49-ctest_output.o" "-c" "/tmp/cirrus-ci-build/target/i686-unknown-freebsd/debug/build/libc-test-1d3cc6a67ca3e2e0/out/ctest_output.c"
warning: build failed, waiting for other jobs to finish...
Exit status: 101
Loading