Skip to content

Commit cbeee03

Browse files
committed
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 apache#1 0x52b2b1d0 in regcomp regex/regcomp.c:3710 apache#2 0x48f55435 in c_regexmatch cmocka/src/cmocka.c:494 apache#3 0x48f65bcf in _cmocka_run_group_tests cmocka/src/cmocka.c:3252 apache#4 0x48f67e2d in cmocka_fs_test_main apps/testing/testsuites/kernel/fs/cmocka_fs_test.c:201 apache#5 0x46210b2a in nxtask_startup sched/task_startup.c:72 apache#6 0x45ff40fb in nxtask_start task/task_start.c:116 apache#7 0x462695bb in pre_start sim/sim_initialstate.c:52 Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
1 parent 4e1ee27 commit cbeee03

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",
@@ -556,9 +555,5 @@ int main(int argc, FAR char *argv[])
556555
&fb_state),
557556
};
558557

559-
snprintf(test_filter, sizeof(test_filter), "test_case_fb_%d",
560-
fb_state.test_case_id);
561-
cmocka_set_test_filter(test_filter);
562-
563558
return cmocka_run_group_tests(tests, NULL, NULL);
564559
}

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",
@@ -442,9 +441,5 @@ int main(int argc, FAR char *argv[])
442441
&lcd_state),
443442
};
444443

445-
snprintf(test_filter, sizeof(test_filter), "test_case_lcd_%d",
446-
lcd_state.test_case_id);
447-
cmocka_set_test_filter(test_filter);
448-
449444
return cmocka_run_group_tests(tests, NULL, NULL);
450445
}

0 commit comments

Comments
 (0)