diff --git a/src/config_format/flb_cf_fluentbit.c b/src/config_format/flb_cf_fluentbit.c index 5e51e47ef07..932d12407e4 100644 --- a/src/config_format/flb_cf_fluentbit.c +++ b/src/config_format/flb_cf_fluentbit.c @@ -447,6 +447,7 @@ static int read_config(struct flb_cf *cf, struct local_ctx *ctx, cfg_file = tmp; } } +#ifndef _WIN32 /* check if readed file */ for (i=0; i<*ino_num; i++) { if (st.st_ino == ino_table[i]) { @@ -456,6 +457,7 @@ static int read_config(struct flb_cf *cf, struct local_ctx *ctx, } ino_table[*ino_num] = st.st_ino; *ino_num += 1; +#endif } #endif diff --git a/tests/internal/config_format_fluentbit.c b/tests/internal/config_format_fluentbit.c index 01e430fa647..7e924734b0c 100644 --- a/tests/internal/config_format_fluentbit.c +++ b/tests/internal/config_format_fluentbit.c @@ -15,6 +15,7 @@ #define FLB_000 FLB_TESTS_DATA_PATH "/data/config_format/classic/fluent-bit.conf" #define FLB_001 FLB_TESTS_DATA_PATH "/data/config_format/classic/issue_5880.conf" #define FLB_002 FLB_TESTS_DATA_PATH "/data/config_format/classic/indent_level_error.conf" +#define FLB_003 FLB_TESTS_DATA_PATH "/data/config_format/classic/recursion.conf" #define ERROR_LOG "fluentbit_conf_error.log" @@ -208,9 +209,25 @@ void indent_level_error() unlink(ERROR_LOG); } +void recursion() +{ + struct flb_cf *cf; + + cf = flb_cf_create(); + if (!TEST_CHECK(cf != NULL)) { + TEST_MSG("flb_cf_create failed"); + exit(EXIT_FAILURE); + } + + cf = flb_cf_fluentbit_create(cf, FLB_003, NULL, 0); + + /* No SIGSEGV means success */ +} + TEST_LIST = { { "basic" , test_basic}, { "missing_value_issue5880" , missing_value}, { "indent_level_error" , indent_level_error}, + { "recursion" , recursion}, { 0 } }; diff --git a/tests/internal/data/config_format/classic/recursion.conf b/tests/internal/data/config_format/classic/recursion.conf new file mode 100644 index 00000000000..10fb25d894a --- /dev/null +++ b/tests/internal/data/config_format/classic/recursion.conf @@ -0,0 +1 @@ +@INCLUDE rec* \ No newline at end of file