-
Couldn't load subscription status.
- Fork 641
R6: Fix null pointer crash in tokenDelete function #4324
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
Conversation
61f7ec3 to
55479cd
Compare
3f52a47 to
e7d47bf
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4324 +/- ##
==========================================
- Coverage 86.01% 85.88% -0.13%
==========================================
Files 250 250
Lines 64159 62329 -1830
==========================================
- Hits 55187 53533 -1654
+ Misses 8972 8796 -176 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@gaborbernat Thank you. Valgrind says something. I will look into this. |
|
🤔 considering I did not touch the allocation surprised how could be any new leaks here 🤔 |
|
Yes! Internal token0 and token1 hide the outer ones. |
|
CURRENT.tags may be used in debugging. Please don't include the commits. Could you change the commit header "Fix valgrind error" to "R6: fix valgrind error"? |
The tokenDelete() function in main/tokeninfo.c was being called with NULL pointers from the R6 parser error handling code, causing segmentation faults. The R6 parser in parsers/r-r6class.c had a comment stating "tokenDelete accepts NULL" but the function did not actually handle NULL pointers safely. This occurred when parsing malformed R6 syntax such as: - R6::SomethingElse() (wrong function after R6 namespace) - R6:: (incomplete namespace reference) - R6::R6Clas() (typo in R6Class) The fix ensures ctags handles malformed R6 syntax gracefully by falling back to parsing assignments as regular global variables instead of crashing. Fixes segmentation fault when processing certain R6Class syntax patterns. Signed-off-by: Bernát Gábor <[email protected]>
Signed-off-by: Bernát Gábor <[email protected]>
|
Done 👍 let me know if you'd like anything else. |
|
Once this lands, would it be possible to cut a new release? 🤔 This is actively crashing our OpenGrok indexing 😆 and otherwise we'd have to downgrade back to |
I will release 6.2.1, which may include the commits in this pull request, 556fc03, 0be19d0, and 33d1d1b. I will not release 6.3 until #4266, #4267, and #4268 are merged. |
|
|
|
Thank you. I will work on releasing v6.2.1. It will take a week. |
|
Thanks! |
The
tokenDelete()function in main/tokeninfo.c was being called withNULLpointers from the R6 parser error handling code, causing segmentation faults.The R6 parser in parsers/r-r6class.c had a comment stating
tokenDelete accepts NULL"but the function did not actually handle NULL pointers safely.This occurred when parsing malformed R6 syntax such as:
R6::SomethingElse()(wrong function after R6 namespace)R6::(incomplete namespace reference)R6::R6Clas()(typo in R6Class)The fix ensures ctags handles malformed R6 syntax gracefully by falling back to parsing assignments as regular global variables instead of crashing. Fixes segmentation fault when processing certain R6Class syntax patterns.
Signed-off-by: Bernát Gábor [email protected]