Skip to content

Commit b4def30

Browse files
Zhangshoukuixiaoxiang781216
authored andcommitted
Remove Useless filtering.The string for filtering rules should not point to a stack space
==1805058==ERROR: AddressSanitizer: heap-use-after-free on address 0xe18126a0 at pc 0x52b06320 bp 0xd7b13ee8 sp 0xd7b13ed8 READ of size 1 at 0xe18126a0 thread T0 #0 0x52b0631f in tre_parse regex/regcomp.c:1356 #1 0x52b2b1d0 in regcomp regex/regcomp.c:3710 #2 0x48f55435 in c_regexmatch cmocka/src/cmocka.c:494 #3 0x48f65bcf in _cmocka_run_group_tests cmocka/src/cmocka.c:3252 #4 0x48f67e2d in cmocka_fs_test_main apps/testing/testsuites/kernel/fs/cmocka_fs_test.c:201 #5 0x46210b2a in nxtask_startup sched/task_startup.c:72 #6 0x45ff40fb in nxtask_start task/task_start.c:116 #7 0x462695bb in pre_start sim/sim_initialstate.c:52 Signed-off-by: zhangshoukui <[email protected]>
1 parent 4432d84 commit b4def30

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

testing/drivertest/drivertest_framebuffer.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,6 @@ int main(int argc, FAR char *argv[])
532532
/* Initialize the state data */
533533

534534
struct fb_state_s fb_state;
535-
char test_filter[64];
536535

537536
memset(&fb_state, 0, sizeof(struct fb_state_s));
538537
snprintf(fb_state.devpath, sizeof(fb_state.devpath), "%s",
@@ -552,9 +551,5 @@ int main(int argc, FAR char *argv[])
552551
fb_teardown, &fb_state),
553552
};
554553

555-
snprintf(test_filter, sizeof(test_filter), "test_case_fb_%d",
556-
fb_state.test_case_id);
557-
cmocka_set_test_filter(test_filter);
558-
559554
return cmocka_run_group_tests(tests, NULL, NULL);
560555
}

testing/drivertest/drivertest_lcd.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ int main(int argc, FAR char *argv[])
418418
/* Initialize the state data */
419419

420420
struct lcd_state_s lcd_state;
421-
char test_filter[64];
422421

423422
memset(&lcd_state, 0, sizeof(struct lcd_state_s));
424423
snprintf(lcd_state.devpath, sizeof(lcd_state.devpath), "%s",
@@ -438,9 +437,5 @@ int main(int argc, FAR char *argv[])
438437
lcd_teardown, &lcd_state),
439438
};
440439

441-
snprintf(test_filter, sizeof(test_filter), "test_case_lcd_%d",
442-
lcd_state.test_case_id);
443-
cmocka_set_test_filter(test_filter);
444-
445440
return cmocka_run_group_tests(tests, NULL, NULL);
446441
}

0 commit comments

Comments
 (0)