Skip to content

Commit f386f63

Browse files
cosmo0920nourdouf
authored andcommitted
test: internal: stream_processor: Plug a SEGV for macOS (fluent#10404)
Without TLS initialization, we got the following error on macOS: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100b0defc flb-it-stream_processor`_mk_event_timeout_create(ctx=0x0000000000000000, sec=0, nsec=500000000, data=0x0000600001608460) at mk_event_kqueue.c:222:23 219 EV_SET(&ke, fd, EVFILT_TIMER, EV_ADD, 0, (sec * 1000) + (nsec / 1000000) , event); 220 #endif 221 -> 222 ret = kevent(ctx->kfd, &ke, 1, NULL, 0, NULL); 223 if (ret < 0) { 224 close(fd); 225 mk_libc_error("kevent"); Target 0: (flb-it-stream_processor) stopped. ``` This can be plugged by TLS initialization for eventloop. Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 4724744 commit f386f63

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/internal/stream_processor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ static void test_conv_from_str_to_num()
815815

816816
config = flb_config_init();
817817
config->evl = mk_event_loop_create(256);
818+
flb_engine_evl_init();
818819
flb_engine_evl_set(config->evl);
819820

820821
ret = flb_storage_create(config);

0 commit comments

Comments
 (0)