I wonder why we're using static arrays rather than tor_asprintf()?
Are they long enough for printf-style assert messages?
Maybe nickm knows why they have to be static arrays.
Can the "Non-fatal assertion %s failed" lines be reached with extra == NULL? I think it can, and I think that's a bug.
That preserves the old code behavior (for no expr and variable arguments, thus extra == NULL) and enables using the same functions for tor_assert{_nonfatal}() and the new tor_assertf{_nonfatal}() macros. Unless I'm missing something here?
Shouldn't the tor_assertion_failed_ and tor_bug_occurred_ functions have CHECK_PRINTF annotations now?
Fixed in 999137dcd7406812c99f496b231edaaca3fb7155.
Can the "Non-fatal assertion %s failed" lines be reached with extra == NULL? I think it can, and I think that's a bug.
That preserves the old code behavior (for no expr and variable arguments, thus extra == NULL) and enables using the same functions for tor_assert{_nonfatal}() and the new tor_assertf{_nonfatal}() macros. Unless I'm missing something here?
Fixed in 53192a6467771abddee08e7e8256f43d935037e9 after talking about this on IRC.
I've done a squash, a merge, and a practracker fix as ticket29662_squashed_merged with a PR as https://github.com/torproject/tor/pull/870 . I'll merge it if the CI passes.