Hardening: Introduce overflow-checked custom allocation primitives #4649
+94
−8
Cirrus CI / FreeBSD (make check)
failed
Apr 20, 2026 in 39s
Task Summary
Instruction main failed in 00:20
Details
✅ 00:15 clone
✅ 00:02 install
❌ 00:20 main
/tmp/cirrus-ci-build/lib//decompress/zstd_decompress.c:140:24: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
140 | const ZSTD_DDict** oldTable = hashSet->ddictPtrTable;
| ^
/tmp/cirrus-ci-build/lib//decompress/../common/allocations.h57:35 | if (nmemb > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
29: error: use of undeclared identifier 'SIZE_MAX'
:
:35 57 | if (nmemb > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
:29: error: use of undeclared identifier 'SIZE_MAX'
/tmp/cirrus-ci-build/lib//decompress/../common/allocations.h /tmp/cirrus-ci-build/lib//compress/../common/allocations.h42 errors generated.
35 | if (nmemb > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
/tmp/cirrus-ci-build/lib//decompress/../common/allocations.h:57:29: error: use of undeclared identifier 'SIZE_MAX'
57 | if (nmemb > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
: error:gmake[2]: *** [Makefile:218: obj/conf_788d2a922d9a63000c483dbc7b112b32/dynamic/zstd_ddict.o] Error 1
s generated.
2gmake[2]: *** [Makefile:222: obj/conf_83f08fd8c372e4b935c5f7dffa68bced/static/zstd_decompress.o] Error 1
57:29: error: use of undeclared identifier 'SIZE_MAX'
57 | if (nmemb > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
35 error:s29: error: use of undeclared identifier 'SIZE_MAX'
35 | generated.
gmake[2]: *** [Makefile:218: obj/conf_788d2a922d9a63000c483dbc7b112b32/dynamic/zstd_compress.o] Error 1
/tmp/cirrus-ci-build/lib//decompress/zstd_decompress.c:141:12: error: redefinition of 'oldTableSize' with a different type: 'size_t' (aka 'unsigned long') vs 'const size_t' (aka 'const unsigned long')
141 | size_t oldTableSize = hashSet->ddictPtrTableSize;
| ^
/tmp/cirrus-ci-build/lib//decompress/zstd_decompress.c:132:18: note: previous definition is here
132 | size_t const oldTableSize = hashSet->ddictPtrTableSize;
| ^
i/tmp/cirrus-ci-build/lib//decompress/zstd_decompress.cf: 140:24: 2error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
140 | const ZSTD_DDict** oldTable = hashSet->ddictPtrTable;
| ^
( errornsm generatede.
mgmake[2]: *** [Makefile:218: obj/conf_788d2a922d9a63000c483dbc7b112b32/dynamic/zstdmt_compress.o] Error 1
b > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
/tmp/cirrus-ci-build/lib//decompress/../common/allocations.h:57:29: error: use of undeclared identifier 'SIZE_MAX'
57 | if (nmemb > 0 && size > SIZE_MAX / nmemb) return NULL;
| ^
24 errors generated.
errors generated.
gmake[2]: *** [Makefile:218: obj/conf_788d2a922d9a63000c483dbc7b112b32/dynamic/zstd_decompress.o] Error 1
gmake[2]: *** [Makefile:222: obj/conf_83f08fd8c372e4b935c5f7dffa68bced/static/zstd_ddict.o] Error 1
echo "Update zstd manual in /doc"
Update zstd manual in /doc
./gen_html 1.6.0 ../../lib/zstd.h ../../doc/zstd_manual.html
gmake[1]: Leaving directory '/tmp/cirrus-ci-build/contrib/gen_html'
gmake[1]: *** [Makefile:113: libzstd.a] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: *** [Makefile:154: libzstd.so.1.6.0] Error 2
gmake[1]: Leaving directory '/tmp/cirrus-ci-build/lib'
gmake: *** [Makefile:63: lib] Error 2
Exit status: 2
Loading