So it turns out that glibc 2.35 in Fedora 36 is more tightly synced with release/2.35/master branch of glibc, and the commit that makes the difference is 10fe3cd309b32c003a6b98e08928e7d6007caecf
https://github.com/bminor/glibc/commit/10fe3cd309b32c003a6b98e08928e7d6007caecf
Patching Ubuntu's glibc 2.35-0ubuntu3.1 with fix from that commit fixes the segfault.
So it turns out that glibc 2.35 in Fedora 36 is more tightly synced with release/2.35/master branch of glibc, and the commit that makes the difference is 10fe3cd309b32c0 03a6b98e08928e7 d6007caecf
https:/ /github. com/bminor/ glibc/commit/ 10fe3cd309b32c0 03a6b98e08928e7 d6007caecf
Patching Ubuntu's glibc 2.35-0ubuntu3.1 with fix from that commit fixes the segfault.