Skip to content

tests: runtime: Plug a SEGV occurrence on macOS - #12293

Open
cosmo0920 wants to merge 1 commit into
masterfrom
cosmo0920-plug-segv-on-core_routes-on-macos
Open

tests: runtime: Plug a SEGV occurrence on macOS#12293
cosmo0920 wants to merge 1 commit into
masterfrom
cosmo0920-plug-segv-on-core_routes-on-macos

Conversation

@cosmo0920

@cosmo0920 cosmo0920 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Fixed the SEGV in tests/runtime/core_routes.c:72.

Cause: macOS calculated olimit from RLIMIT_NOFILE—419,430 on this host—then indexed a 257-element stack array. The limit is now capped to the array capacity.

Verification passed:

  • Target rebuild
  • bin/flb-rt-core_routes -v
  • Focused ctest -R '^flb-rt-core_routes$'
  • Low-descriptor case with ulimit -n 256

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Bug Fixes
    • On macOS, output instance limits are now properly capped to prevent creating more instances than supported.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94d7d6ee-471a-43a1-b77d-bf30c0d89985

📥 Commits

Reviewing files that changed from the base of the PR and between 6315162 and a948e78.

📒 Files selected for processing (1)
  • tests/runtime/core_routes.c

📝 Walkthrough

Walkthrough

The macOS runtime route test now caps olimit at the output_instances array capacity when the file-descriptor limit is higher.

Changes

macOS output instance limit

Layer / File(s) Summary
Clamp output instance capacity
tests/runtime/core_routes.c
The test caps olimit at the output_instances array capacity when required.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to a948e

The change caps the macOS-derived descriptor limit to the test array capacity, preventing the reported test crash without changing product runtime behavior; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: edsiper

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the macOS SEGV fix in the runtime tests, which matches the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-plug-segv-on-core_routes-on-macos

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant