-
Notifications
You must be signed in to change notification settings - Fork 60
Fix unsafe parsedDiagnostics array push #549
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
CC @zth |
Yes, exactly, we haven't done this type of fix because this in essence means we've missed cases in parsing, and we don't want to swallow that, better have people report it. I'm thinking we could do this fix (since not crashing is good) if we combine it with prompting the user that something went wrong and logging instructions for how to report the issue with relevant information. Kind of like we did in #544. What do you think @cristianoc @fhammerschmidt ? |
We are already giving better reports sincea recent PR. I would say let's see how that goes first. |
You mean for the reanalyze error message? |
Forgot what the PR was for. |
We are particularly vulnerable with platforms not widely used, and it would be nice to make sure that corner case issues get reported. |
I think we can make the prompt "annoying" if we want, but letting it crash will mean making the extension unusable for users as long as that diagnostic is reported. I think it would be nice to avoid that, but sure, we could let it happen to make it very sure that people report the issue. |
I was thinking of making it annoying or things might not be reported. As a first step. Then learn from there. |
Also, if a more robust fix is desired, then it's better to move towards a more robust fix. Rather than sweep the issue under the carpet. The more robust fix is not to print random text on one side, coupled with random text parsing on the other side, and hope for the best. But to export in a specified JSON format, and read that. |
So what do you suggest should I do with this PR? Obviously, the more robust fix is a bit out of scope. |
I suggest to drop it. It's not very different to adding -1 to the return of a wrong program that returns the results off by 1. |
fixes #548
Not sure what changed or why we did not encounter this before yet.
Maybe we want it to crash here, because there is some message shape that we did not take into account?