mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-21 03:47:07 +00:00
general: cmake: add ZINT_SANITIZEM (clang -fsanitize=memory) option
and suppress errors in lib and backend tests (pretty sure they're nearly all false positives apart from maybe 2 non-initializations in "gif.c" (`pOut` buffer) and "raster.c" (`rotated_pixbuf`) github: install de_DE.UTF-8 locale in ubuntu-debug also
This commit is contained in:
@@ -758,7 +758,7 @@ static void test_utf8_to_eci_ascii(const testCtx *const p_ctx) {
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
||||
char dest[128];
|
||||
char dest[128] = {0}; /* Suppress clang -fsanitize=memory false positive */
|
||||
|
||||
testStart("test_utf8_to_eci_ascii");
|
||||
|
||||
@@ -815,7 +815,7 @@ static void test_utf8_to_eci_utf16be(const testCtx *const p_ctx) {
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
int out_length, eci_length;
|
||||
char dest[1024];
|
||||
char dest[1024] = {0}; /* Suppress clang -fsanitize=memory false positive */
|
||||
|
||||
if (testContinue(p_ctx, i)) continue;
|
||||
|
||||
@@ -880,7 +880,7 @@ static void test_utf8_to_eci_utf16le(const testCtx *const p_ctx) {
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
int out_length, eci_length;
|
||||
char dest[1024];
|
||||
char dest[1024] = {0}; /* Suppress clang -fsanitize=memory false positive */
|
||||
|
||||
if (testContinue(p_ctx, i)) continue;
|
||||
|
||||
@@ -942,7 +942,7 @@ static void test_utf8_to_eci_utf32be(const testCtx *const p_ctx) {
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
int out_length, eci_length;
|
||||
char dest[1024];
|
||||
char dest[1024] = {0}; /* Suppress clang -fsanitize=memory false positive */
|
||||
|
||||
if (testContinue(p_ctx, i)) continue;
|
||||
|
||||
@@ -1006,7 +1006,7 @@ static void test_utf8_to_eci_utf32le(const testCtx *const p_ctx) {
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
int out_length, eci_length;
|
||||
char dest[1024];
|
||||
char dest[1024] = {0}; /* Suppress clang -fsanitize=memory false positive */
|
||||
|
||||
if (testContinue(p_ctx, i)) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user