mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Infer flagged several test/unittest sites that dereference the result of an allocation (or an allocating helper) without checking it for NULL: - tests/async_queries.c: fatal() calls exit() but was not marked noreturn, so Infer assumed add_query() continued past the "if (!e || !q2) fatal(...)" guard. Mark fatal() ATTRIBUTE_NORETURN. - tests/mysql_client_test.c: add the usual check_stmt() after mysql_stmt_init() in test_bug16143, test_bug16144 and test_bug38486. - unittest/json_lib/json_normalize-t.c: check init_dynamic_string(). - unittest/mysys/bitmap-t.c: check my_bitmap_init(). - unittest/mysys/ma_dyncol-t.c: check the val/upd/res malloc()s. - unittest/mysys/thr_template.c: replace assert(threads) (compiled out under NDEBUG) with an unconditional check. - unittest/sql/mf_iocache-t.cc: check the buf/buf_i/buf_o malloc()s. Test-only changes; on allocation failure the tests now abort cleanly via BAIL_OUT() instead of dereferencing NULL.