Skip to content
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

v-analyzer segmentation fault on large files/projects #110

Open
JalonSolov opened this issue Jun 19, 2024 · 2 comments
Open

v-analyzer segmentation fault on large files/projects #110

JalonSolov opened this issue Jun 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JalonSolov
Copy link

Describe the bug

v-analyzer is not limiting itself to V files.

Expected Behavior

v-analyzer only indexes V related files.

Current Behavior

v-analyzer apparently tries to index ALL files in a project.

In one project, I generated a 13 GB .txt file, and v-analyzer started crashing with a segmentation fault. After I deleted that file, v-analyzer worked again.

Reproduction Steps

Have a huge file in a V project. Watch it bomb out with a segmentation fault.

Possible Solution

Limit to indexing .v, .vv, and .vsh files. It's fine if it notes the other files' existence, but it should not try to index them.

Additional Information/Context

No response

Environment details (v doctor output)

V full version: V 0.4.6 efa98d9.58f4e12
OS: linux, "Manjaro Linux"
Processor: 32 cpus, 64bit, little endian, AMD Ryzen 9 7950X 16-Core Processor

getwd: /home/jalon
vexe: /home/jalon/git/v/v
vexe mtime: 2024-06-19 11:33:44

vroot: OK, value: /home/jalon/git/v
VMODULES: OK, value: /home/jalon/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.45.1
Git vroot status: weekly.2024.24-26-g58f4e126
.git/config present: true

CC version: cc (GCC) 14.1.1 20240522
thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5

Editor name

vscode

v-analyzer Version

v-analyzer version 0.0.4-beta.1.e91f8a4

VS Code Extension Version

v0.0.4

@JalonSolov JalonSolov added the bug Something isn't working label Jun 19, 2024
@JalonSolov JalonSolov changed the title (please, provide bug report summary here) v-analyzer segmentation fault on large files Jun 19, 2024
@JalonSolov
Copy link
Author

Yes, this problem will likely occur on large V files, too, I just have trouble believing anyone will put that much V code in a .v file. However, it is definitely something that also needs to be addressed.

@JalonSolov JalonSolov changed the title v-analyzer segmentation fault on large files v-analyzer segmentation fault on large files/projects Jun 19, 2024
@JalonSolov
Copy link
Author

JalonSolov commented Jun 19, 2024

It also fails on large V projects, such as V itself. When I opened vlib/x/json2/decoder2/decode.v, v-analyzer crashed with a segmentation fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant