Harden against files with embedded NULL#977
Conversation
pfitzseb
left a comment
There was a problem hiding this comment.
Still not sure how this can happen.
|
Just some random piece of code writing an invalid file to disc, right? |
|
Hm, fair. I thought VSCode would handle that case, but I guess JS strings can contain |
|
This is a load path where we load the file content directly from disc, VSC is only telling us that the file changed on disc, but completely out of the picture when it comes to the file content. That whole design is pretty broken because VS Code now supports workspaces that don't exist on disc at all, and I think they are working on some LSP version where we essentially don't have to use file IO functions in the LS at all but can get all content from the client via the protocol, but not entirely sure what the status on that is. |
|
Oh, I could've just read the |
Fixes https://github.com/julia-vscode/crashreporting-issues/issues/46.