mirror of https://gerrit.osmocom.org/libosmocore
Vadim Yanitskiy
653c31e875
The following can be seen when building with CC=clang: utils/utils_test.c:1239:2: runtime error: applying non-zero offset 99 to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils/utils_test.c:1239:2 in utils/utils_test.c:1241:3: runtime error: applying non-zero offset 99 to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils/utils_test.c:1241:3 in utils/utils_test.c:1242:2: runtime error: applying non-zero offset 99 to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils/utils_test.c:1242:2 in 44. testsuite.at:274: 44. utils (testsuite.at:274): FAILED (testsuite.at:278) This makes utils_test fail due to unexpected UBSan's output. Even though passing NULL to the strbuf API is relatively safe, it makes no sense and the API user should ensure that this never happens. And so we should not be testing this case. Change-Id: Icd2323e93ec64afc1822d48e5e1d090083edf539 |
||
---|---|---|
.. | ||
utils_test.c | ||
utils_test.err | ||
utils_test.ok |