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
Pascal parser: ensure TagEntryInfo is always initialized #2987
Conversation
@@ -51,7 +51,7 @@ static void createPascalTag (tagEntryInfo* const tag, | |||
else | |||
{ | |||
/* TODO: Passing NULL as name makes an assertion behind initTagEntry failure */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not so sure about this comment but I left it as it is also still present in the uctags Pascal parser.
Is this fixed in #2984? |
Not sure. I guess not as it doesn't contain parser changes. |
Ok, good, that also means it won't undo it when #2984 is merged. |
This fixes crashes when using incomplete "type" declarations. Fixes geany#2358, fixes geany#2982 and fixes geany#2428.
4d0874e
to
bf6c1f7
Compare
Tested the problematic type declaration against #2984 without this change and it still crashes. Also added another example declaration to the test case for better coverage (and it triggered Travis CI which is working again). |
Has this change been submitted upstream so it doesn't get lost? Basically this depends on the outcome of the discussion in #2991 (do you have any feedback for that one?). Pascal is one of the languages we could probably take from uctags and if we do (and this change isn't there yet), this patch should wait until #2991 is merged, otherwise it gets overwritten. |
The change in the parser itself is actually taken from uctags.
|
Fixes geany#2358, fixes geany#2982, fixes geany#2428 and fixes geany#2987.
Fixes geany#2358, fixes geany#2982, fixes geany#2428 and fixes geany#2987.
Fixes geany#2358, fixes geany#2982, fixes geany#2428 and fixes geany#2987.
This fixes crashes when using incomplete "type" declarations.
Fixes #2358, fixes #2982 and fixes #2428.
The
initTagEntry()
call is necessary to initialize theTagEntryInfo
object. TheKIND_GHOST_INDEX
argument is taken from the uctags Pascal parser.