ref(gnu-integration): make path optional#4688
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4688 +/- ##
==========================================
+ Coverage 85.04% 85.09% +0.05%
==========================================
Files 156 156
Lines 15858 15859 +1
Branches 2684 2684
==========================================
+ Hits 13486 13496 +10
+ Misses 1589 1584 -5
+ Partials 783 779 -4
|
Comment on lines
+15
to
+18
| FUNCTION_RE = r"[^@]+?)\s+@\s+0x[0-9a-fA-F]+" | ||
|
|
||
| FRAME_RE = r""" | ||
| ^(?P<index>\d+)\.\s+(?P<function>{FUNCTION_RE}\s+in\s+(?P<package>.+)$ | ||
| ^(?P<index>\d+)\.\s+(?P<function>{FUNCTION_RE}(?:\s+in\s+(?P<package>.+))? |
There was a problem hiding this comment.
Potential bug: The `FUNCTION_RE` regex is syntactically incorrect, causing compilation to fail. This silently breaks the entire GNU backtrace integration, preventing stacktrace parsing.
- Description: The
FUNCTION_REvariable contains a malformed regular expression with an unbalanced parenthesis. When this is formatted into the mainFRAME_RE, it results in a regex that cannot be compiled byre.compile. Because this compilation happens inside acapture_internal_exceptions()block, there.erroris caught and suppressed. Consequently, the GNU backtrace integration silently fails to parse any backtraces, leading to a complete loss of this debugging functionality without any warning to the user. - Suggested fix: The
FUNCTION_REconstant is malformed with an extra parenthesis. It should be corrected tor'[^@]+?'. Consequently,FRAME_REmust be updated to explicitly include the address pattern (\s+@\s+0x[0-9a-fA-F]+) and correctly close thefunctioncapture group, ensuring the final regex is syntactically valid.
severity: 0.8, confidence: 0.95
Did we get this right? 👍 / 👎 to inform future reviews.
sentrivana
enabled auto-merge (squash)
August 12, 2025 11:14
MeredithAnya
added a commit
to getsentry/snuba
that referenced
this pull request
Aug 15, 2025
okay so I had to add a fix (getsentry/sentry-python#4688) to the earlier change (getsentry/sentry-python#4598) I made in the sentry-python sdk. so now I'm bumping the sentry-sdk to `2.35.0` to grab that fix. I added the `update_current_span ` convenience funtion that was also in this release getsentry/sentry-python#4673 **testing:** going to test this out in S4S first before moving on to de and us
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.
I updated the GNU Integration in #4598 but I didn't make the path optional so if we didn't have the path included, then the stacktrace didn't get parsed:
So updated it so that regardless of whether the path is present it will get parsed