Skip to content

Commit

Permalink
Remove Useless filtering.The string for filtering rules should not po…
Browse files Browse the repository at this point in the history
…int 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]>
  • Loading branch information
Zhangshoukui authored and xiaoxiang781216 committed Jan 16, 2025
1 parent 4432d84 commit b4def30
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions testing/drivertest/drivertest_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ int main(int argc, FAR char *argv[])
/* Initialize the state data */

struct fb_state_s fb_state;
char test_filter[64];

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

snprintf(test_filter, sizeof(test_filter), "test_case_fb_%d",
fb_state.test_case_id);
cmocka_set_test_filter(test_filter);

return cmocka_run_group_tests(tests, NULL, NULL);
}
5 changes: 0 additions & 5 deletions testing/drivertest/drivertest_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ int main(int argc, FAR char *argv[])
/* Initialize the state data */

struct lcd_state_s lcd_state;
char test_filter[64];

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

snprintf(test_filter, sizeof(test_filter), "test_case_lcd_%d",
lcd_state.test_case_id);
cmocka_set_test_filter(test_filter);

return cmocka_run_group_tests(tests, NULL, NULL);
}

0 comments on commit b4def30

Please sign in to comment.