better abort in internal_logging.cc:Log

We use __builtin_trap (which compiles to explicitly undefined
instruction or "int 3" on x64-en), when available, to make those
crashing Log invokations a little nicer to debug.
This commit is contained in:
Aliaksey Kandratsenka 2024-05-12 15:47:02 -04:00
parent a6864ae233
commit 65ce9e899e
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ void Log(LogMode mode, const char* filename, int line,
WriteMessage(state.buf_, msglen);
#if defined(__has_builtin)
#if __has_builtin(__builtin_trap)
__builtin_trap();
#endif
#endif // defined(__has_builtin)
abort();
}