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 parser segfault with -silent, discovered with radamsa, for a very long -----n----m------ pattern. #22095

Closed
spytheman opened this issue Aug 22, 2024 · 1 comment · Fixed by #22098
Labels
Bug This tag is applied to issues which reports bugs. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).

Comments

@spytheman
Copy link
Member

spytheman commented Aug 22, 2024

V doctor:

V full version: V 0.4.7 c92577e.18f8999
OS: linux, Ubuntu 20.04.6 LTS
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz

getwd: /space/v/oo
vexe: /space/v/oo/v
vexe mtime: 2024-08-22 10:31:40

vroot: OK, value: /space/v/oo
VMODULES: OK, value: /home/delian/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.45.2
Git vroot status: weekly.2024.34-21-g18f89991-dirty
.git/config present: true

CC version: cc (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9

What did you do?
./v -g -o vdbg cmd/v && ./vdbg -silent bug7_shortened.v

What did you expect to see?

The compiler not segfaulting, even with -silent

What did you see instead?

#0 15:33:07 ^ master /space/v/oo>./v -silent bug7_shortened.v
Segmentation fault (core dumped)

bug7_shortened.v:

----------n----------------------------------------------------------------------------------m-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------M'Hellprintln('Hel-o, World!')

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@spytheman spytheman added Bug This tag is applied to issues which reports bugs. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones). labels Aug 22, 2024
@spytheman
Copy link
Member Author

spytheman commented Aug 22, 2024

The above is a shortened variant. The full file generated by radamsa is here (98KB):
bug7.v.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).
Projects
None yet
1 participant