Skip to content

Conversation

@cedric-chedaleux
Copy link
Member

The unit tests binary can be compiled with -DTEST_ENABLED=ON build parameter

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
@cedric-chedaleux cedric-chedaleux force-pushed the cch/fix-issue-17 branch 2 times, most recently from affc5dd to 5b0ae44 Compare August 22, 2025 12:44
The condition to know if file rotation should take place can be accessed
in a concurrent manner by 2 or more threads. One thread can enter the if
block and open a new file and close the current one while the other thread
still tries to write to the current logfile that has been closedl!
This leads to segfault.

Let's move the mutex before the block to prevent this race condition.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
@cedric-chedaleux cedric-chedaleux force-pushed the cch/fix-issue-17 branch 4 times, most recently from bbe6390 to 06e630a Compare August 22, 2025 13:19
Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
@cedric-chedaleux cedric-chedaleux force-pushed the cch/fix-issue-17 branch 2 times, most recently from 786ac41 to 76672d4 Compare August 22, 2025 13:39
@cedric-chedaleux cedric-chedaleux self-assigned this Aug 22, 2025
@cedric-chedaleux cedric-chedaleux merged commit bf0443f into master Aug 25, 2025
2 checks passed
@cedric-chedaleux cedric-chedaleux deleted the cch/fix-issue-17 branch August 25, 2025 15:24
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.

Crash when maxCapSize is set

1 participant