Thank you for your outstanding work on exposing compiler bugs! Even if it's not intentional, it is still outstanding :)
Here is minimal godbolt repro: https://godbolt.org/z/exoe9nKeh. Notes:
- Reproduces ever since fmt 10.1.0;
- If I write a formatter for
MyStruct, crash is gone;
- If I select clang 16.0.0 or above, crash is gone;
- If I set
-std=c++14 or below, crash is gone;
- In my local testing, replacing two last lines in
check_format_string with plain parse_format_string<true>(s, checker(s)) seems to avoid the crash.
We would like to use new fmt version, but we're not ready yet to upgrade our toolchain to clang 16 or above. Even though the crash reproduces only if formatter is missing, the crash itself hides the real problem from the user -- they might think that compiler is just bad, and ignore the error above about missing formatter.
Do you think this is something that can be fixed or worked around in fmt codebase? If not, please advise if/how we can use new fmt versions with older clang.
Thank you for your outstanding work on exposing compiler bugs! Even if it's not intentional, it is still outstanding :)
Here is minimal godbolt repro: https://godbolt.org/z/exoe9nKeh. Notes:
MyStruct, crash is gone;-std=c++14or below, crash is gone;check_format_stringwith plainparse_format_string<true>(s, checker(s))seems to avoid the crash.We would like to use new fmt version, but we're not ready yet to upgrade our toolchain to clang 16 or above. Even though the crash reproduces only if formatter is missing, the crash itself hides the real problem from the user -- they might think that compiler is just bad, and ignore the error above about missing formatter.
Do you think this is something that can be fixed or worked around in fmt codebase? If not, please advise if/how we can use new fmt versions with older clang.