Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: decoder_prometheus: add Fluent Bit issue test #9267 #217

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

edsiper
Copy link
Member

@edsiper edsiper commented Aug 26, 2024

valgrind ./tests/cmt-test-prometheus_parser issue_fluent_bit_9267
==260375== Memcheck, a memory error detector
==260375== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==260375== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==260375== Command: ./tests/cmt-test-prometheus_parser issue_fluent_bit_9267
==260375==
Test issue_fluent_bit_9267...                   ==260375== Invalid free() / delete / delete[] / realloc()
==260375==    at 0x484988F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==260375==    by 0x12E9DC: reset_context (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x12EFD0: finish_metric (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x12E229: cmt_decode_prometheus_parse (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x12DEAF: cmt_decode_prometheus_create (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x121FB8: test_issue_fluent_bit_9267 (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x122647: acutest_do_run_ (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x11E850: main (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==  Address 0x4a81dc4 is 4 bytes inside a block of size 7 alloc'd
==260375==    at 0x4846828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==260375==    by 0x491F34E: strdup (strdup.c:42)
==260375==    by 0x12FFF1: parse_metric_name (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x12E401: cmt_decode_prometheus_parse (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x12DEAF: cmt_decode_prometheus_create (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x121FB8: test_issue_fluent_bit_9267 (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x122647: acutest_do_run_ (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==    by 0x11E850: main (in /home/edsiper/c/cmetrics/build/tests/cmt-test-prometheus_parser)
==260375==
[ OK ]
SUCCESS: All unit tests have passed.

@edsiper
Copy link
Member Author

edsiper commented Aug 26, 2024

note: CI aims to fail until the fix is in place

@edsiper
Copy link
Member Author

edsiper commented Aug 26, 2024

re: fluent/fluent-bit#9267 / @leonardo-albertovich in this branch the test case is ready.

@edsiper edsiper merged commit 9711d3e into master Aug 28, 2024
16 of 18 checks passed
@edsiper edsiper deleted the flb-issue-9267 branch August 28, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant