Hello Maria, On Mon, 12 Oct 2026, Maria Matejka via Bird-users wrote:
we are releasing BIRD versions 3.4.0 and 2.20.0.
I tried to build BIRD 3.4.0 on Fedora Rawhide on s390x, but it fails (and only on this architecture) like this: [...] obj/lib/strtoul_test: t_bstrhextobin 0.076523176s [FAIL] obj/lib/strtoul_test: t_bstrbintohex 0.045840313s [FAIL] obj/lib/strtoul_test 0.122865224s [FAIL] The issue likely also affects BIRD 2.20.0, find my patch suggestion below: --- 8< --- Test: Fix stack overflow in bt_fmt_bytestr() bt_fmt_bytestr() allocates len + 1 bytes but writes two hex digits per byte plus a terminating NUL, overflowing the alloca() buffer. The formatter runs for every test case, not only on failure. On x86_64, alloca's 16-byte rounding usually hides the overflow; on s390x it smashes the stack and t_bstrhextobin/t_bstrbintohex fail. Allocate 2 * len + 1 bytes and print with %02x, so every byte is exactly two digits (the old %hx also dropped leading zeros). Fixes: 3567ebc03 ("Lib: Add tests for strtoul.c") --- bird-3.4.0/lib/strtoul_test.c 2026-10-12 08:04:16.000000000 +0000 +++ bird-3.4.0/lib/strtoul_test.c.bytestr-overflow 2026-10-12 21:48:12.603991062 +0000 @@ -201,11 +201,11 @@ return; } - char *tmp = allocz(data->len + 1); + char *tmp = allocz(2 * data->len + 1); char *t = tmp; for (int i = 0; i < data->len; i++) - t += bsprintf(t, "%hx", data->buf[i]); + t += bsprintf(t, "%02x", data->buf[i]); snprintf(buf, size, "0x%s", tmp); } --- 8< --- Regards, Robert