mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-23 03:26:56 -04: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:
parent
33135fc146
commit
c7cf006e71
38 changed files with 177 additions and 129 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue