https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103167
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Martin Liška from comment #1) > /home/mliska/Programming/binutils-gdb/libbacktrace/xztest.c:175:13: runtime > error: null pointer passed as argument 2, which is declared to never be null diff --git a/libbacktrace/xztest.c b/libbacktrace/xztest.c index b2533cb1804..a42bc59efd8 100644 --- a/libbacktrace/xztest.c +++ b/libbacktrace/xztest.c @@ -172,7 +172,7 @@ test_samples (struct backtrace_state *state) tests[i].name, uncompressed_len, v); ++failures; } - else if (memcmp (tests[i].uncompressed, uncompressed, v) != 0) + else if (v && memcmp (tests[i].uncompressed, uncompressed, v) != 0) { size_t j;