We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87908c9 commit 6d17992Copy full SHA for 6d17992
mem/mem_zero_detect_test.c
@@ -73,6 +73,19 @@ int main(int argc, char *argv[])
73
}
74
putchar('.');
75
76
+ // Test to help memory checkers
77
+ for (i = 1; i < 2345; i++) {
78
+ uint8_t *newbuf = (uint8_t *) malloc(i);
79
+ memset(newbuf, 0, i);
80
+ failures = isal_zero_detect(newbuf, i);
81
+ if (failures) {
82
+ printf("Fail alloc test\n");
83
+ free(newbuf);
84
+ return failures;
85
+ }
86
87
88
+
89
// Test small buffers
90
for (i = 0; i < TEST_LEN; i++) {
91
failures |= isal_zero_detect(buf, i);
@@ -221,6 +234,7 @@ int main(int argc, char *argv[])
221
234
222
235
fflush(0);
223
236
237
+ aligned_free(buf);
224
238
printf(failures == 0 ? " Pass\n" : " Fail\n");
225
239
return failures;
226
240
0 commit comments