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

radamsa #22084

Closed
prashanth-hegde opened this issue Aug 20, 2024 · 1 comment
Closed

radamsa #22084

prashanth-hegde opened this issue Aug 20, 2024 · 1 comment
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).

Comments

@prashanth-hegde
Copy link
Contributor

prashanth-hegde commented Aug 20, 2024

V doctor:

V full version: V 0.4.7 510500d.6dbf9c9
OS: macos, macOS, 14.4.1, 23E224
Processor: 10 cpus, 64bit, little endian, Apple M1 Max

getwd: /Users/Z002DCM/apps/v
vexe: /Users/Z002DCM/apps/v/v
vexe mtime: 2024-08-20 15:10:41

vroot: OK, value: /Users/Z002DCM/apps/v
VMODULES: OK, value: /Users/Z002DCM/.vmodules
VTMP: OK, value: /tmp/v_503

Git version: git version 2.39.3 (Apple Git-146)
Git vroot status: 6dbf9c91
.git/config present: true

CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc status: thirdparty-macos-arm64 713692d4

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

println('Hln('Hello, WVrl<!

What did you expect to see?

What did you see instead?

x.v:1:15: error: unexpected name `Hello`, expecting `)`
    1 | println('Hln('Hello, WVrl<!
      |               ~~~~~
================ V panic ================
   module: v.ast
 function: default_table_panic_handler()
  message: table.sym: invalid type (typ=ast.Type(0x0 = 0) idx=0). Compiler bug. This should never happen. Please report the bug using `v bug file.v`.

     file: /Users/Z002DCM/apps/v/vlib/v/ast/table.v:86
   v hash: 6dbf9c9
=========================================
0   parser_speed                        0x0000000102b4e81c v__ast__Table_panic + 0
1   parser_speed                        0x0000000102b4e864 v__ast__Table_panic + 72
2   parser_speed                        0x0000000102b46d70 v__ast__Table_sym + 320
3   parser_speed                        0x0000000102bcd07c v__parser__Parser_parse_generic_inst_type + 484
4   parser_speed                        0x0000000102b965e0 v__parser__Parser_parse_any_type + 5648
5   parser_speed                        0x0000000102b9b1c8 v__parser__Parser_parse_type + 2148
6   parser_speed                        0x0000000102ba1d30 v__parser__Parser_struct_init + 296
7   parser_speed                        0x0000000102ba50c8 v__parser__Parser_name_expr + 10756
8   parser_speed                        0x0000000102b9d8b0 v__parser__Parser_check_expr + 2056
9   parser_speed                        0x0000000102b9134c v__parser__Parser_expr + 56
10  parser_speed                        0x0000000102b88cac v__parser__Parser_expr_list + 72
11  parser_speed                        0x0000000102be3488 v__parser__Parser_parse_multi_expr + 196
12  parser_speed                        0x0000000102bc2014 v__parser__Parser_stmt + 2724
13  parser_speed                        0x0000000102be2104 v__parser__Parser_other_stmts + 2400
14  parser_speed                        0x0000000102bd6a28 v__parser__Parser_top_stmt + 2476
15  parser_speed                        0x0000000102bd23bc v__parser__Parser_parse + 552
16  parser_speed                        0x0000000102beaa10 main__process_files + 592
17  parser_speed                        0x0000000102bea6e0 main__main + 432
18  parser_speed                        0x0000000102bee2a4 main + 84
19  dyld                                0x000000019c62a0e0 start + 2360

autofuzz.log

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: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones). Status: Confirmed This bug has been confirmed to be valid by a contributor. labels Aug 20, 2024
@spytheman
Copy link
Member

Fixed on latest V after commit e3ceb58:

#1 08:36:45 ^ master /v/oo>./v -g self
V self compiling (-g -o v2)...
V built successfully as executable "v".
#0 08:36:57 ^ master /v/oo>./v version
V 0.4.7 971feb8
#0 08:36:59 ^ master /v/oo>./v -g /v/misc/2024_08_22__21/issue_22084.v
/space/v/misc/2024_08_22__21/issue_22084.v:1:15: error: unexpected name `Hello`, expecting `)`
    1 | println('Hln('Hello, WVrl<!
      |               ~~~~~
#1 08:37:06 ^ master /v/oo>./v -g -silent /v/misc/2024_08_22__21/issue_22084.v
#1 08:37:14 ^ master /v/oo>./v -g cmd/tools/measure/parser_speed.v
#0 08:37:37 ^ master /v/oo>cmd/tools/measure/parser_speed  /v/misc/2024_08_22__21/issue_22084.v
[cmd/tools/measure/parser_speed.v:19] main.comments_mode: skip_comments
       194us          9         28          1         3.111          3   /v/misc/2024_08_22__21/issue_22084.v
---------------------------------------------------------------------------------------------------------------------------------------------------
        Time     Tokens      Bytes      Lines   Bytes/Token     Errors
---------------------------------------------------------------------------------------------------------------------------------------------------
       194us          9         28          1         3.111          3   Parser speed:  0.144 MB/s,     5154.6 lines/s,   1 thread(s),     1 files.
#0 08:37:42 ^ master /v/oo>

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. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).
Projects
None yet
Development

No branches or pull requests

2 participants