Fix: ensure that linux binaries have 8mb stack size (musl)#563
Merged
dimitris-m merged 2 commits intomainfrom Feb 4, 2026
Merged
Fix: ensure that linux binaries have 8mb stack size (musl)#563dimitris-m merged 2 commits intomainfrom
dimitris-m merged 2 commits intomainfrom
Conversation
81633f0 to
7a691f4
Compare
maciejpirog
approved these changes
Feb 3, 2026
7a691f4 to
55ac586
Compare
Merged
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Feb 15, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [opengrep/opengrep](https://github.com/opengrep/opengrep) | minor | `v1.15.1` → `v1.16.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>opengrep/opengrep (opengrep/opengrep)</summary> ### [`v1.16.0`](https://github.com/opengrep/opengrep/releases/tag/v1.16.0): Opengrep 1.16.0 [Compare Source](opengrep/opengrep@v1.15.1...v1.16.0) #### Improvements - Dart: Add typed metavariabless by [@​maciejpirog](https://github.com/maciejpirog) in [#​551](opengrep/opengrep#551) - Dart: Use case of identifier to guess call vs new by [@​maciejpirog](https://github.com/maciejpirog) in [#​555](opengrep/opengrep#555) - Go: Enable goroutines in taint tracking by [@​maciejpirog](https://github.com/maciejpirog) in [#​559](opengrep/opengrep#559) - Add taint propagation via "for" comprehensions by [@​maciejpirog](https://github.com/maciejpirog) in [#​564](opengrep/opengrep#564) #### Bug Fixes - Rust: Missing Rust type alias translation by [@​smith-xyz](https://github.com/smith-xyz) in [#​549](opengrep/opengrep#549) - Fix: Ensure that linux binaries have 8mb stack size (musl) by [@​dimitris-m](https://github.com/dimitris-m) in [#​563](opengrep/opengrep#563) - Fixed a perf regression by removing system calls and improving the reachability graph and the callee lookup by [@​corneliuhoffman](https://github.com/corneliuhoffman) in [#​556](opengrep/opengrep#556) - Fixed intrafile bug introduced by a superfluous fallback by [@​corneliuhoffman](https://github.com/corneliuhoffman) in [#​567](opengrep/opengrep#567) - Ruby: Always translate `or` and `and` to expression by [@​maciejpirog](https://github.com/maciejpirog) in [#​562](opengrep/opengrep#562) - Bash: Allow redirects before command arguments by [@​maciejpirog](https://github.com/maciejpirog) in [#​548](opengrep/opengrep#548) #### Internal Improvements - Add `show dump-intrafile-graph` and `show dump-taint-signatures` commands by [@​corneliuhoffman](https://github.com/corneliuhoffman) in [#​552](opengrep/opengrep#552) - Improve tainting code by [@​maciejpirog](https://github.com/maciejpirog) in [#​546](opengrep/opengrep#546) - Graph refactoring by [@​corneliuhoffman](https://github.com/corneliuhoffman) in [#​553](opengrep/opengrep#553) #### New Contributors - [@​smith-xyz](https://github.com/smith-xyz) made their first contribution in [#​549](opengrep/opengrep#549) **Full Changelog**: <opengrep/opengrep@v1.15.1...v1.16.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Ni4yIiwidXBkYXRlZEluVmVyIjoiNDIuOTYuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opengrep Core Segfault (-11) - Root Cause and Fix
Opengrep Version: 1.15.1
Summary
The
opengrep-core exited with -11(SIGSEGV) crash on Linux with multiple domains (-j > 1) was caused by musl libc's 128KB default pthread stack size, which is insufficient for PCRE's recursive pattern matching used by aliengrep rules.Root Cause
musl libc defaults to 128KB pthread stack size, compared to glibc's 8MB. When opengrep runs complex aliengrep patterns with PCRE's recursive matching across multiple domains, the 128KB stack overflows.
From musl libc documentation:
The crash manifests as:
SEGV_ACCERRwith a stack-region address indicates hitting the stack guard page (stack overflow).Fix
Added
-Wl,-z,stack-size=8388608linker flag to set 8MB default pthread stack size insrc/main/flags.sh:This linker flag sets the
PT_GNU_STACKprogram header in the ELF binary, which musl reads to determine the default pthread stack size.Verification
Proprietary rules were used.
Raspberry Pi 4 (aarch64, native Linux)
Docker on Mac (x86_64, AWS Lambda-like)
Binary Verification
Affected Environments
All our Linux binaries are affected and these are commonly used in:
This may explain issues like #204.
Not affected:
-j 1)Why Aliengrep Specifically?
Aliengrep uses complex PCRE patterns with:
(?(DEFINE)...)blocks for named subroutines(?&name)These features cause PCRE to use significant stack space during matching. The 128KB musl default is insufficient, while 8MB provides adequate headroom.
References