https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110172
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- I mentioned that on IRC. I'm not sure glibc can even handle exceptions from those functions. Is that supported at all? Does printf clean up its own allocations and locks in that case? IMHO it should be UB for printf_function to exit via an exception.