llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.1k stars 12.01k forks source link

Clangd crashed a lot on intel/compile-time-init-build project #116395

Closed Leonezz closed 2 hours ago

Leonezz commented 2 hours ago

backtrace:

Stack dump:
0.  /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:44: at annotation token
1.  /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:20: parsing function body 'main'
2.  /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:20: in compound statement ('{}')
3.  /home/xxx/compile-time-init-build/include/msg/message.hpp:297:60: instantiating class definition 'msg::detail::message<stdx::ct_string<9>{{"test_msg"}}, msg::detail::field_t<sc::string_constant<char, 'f'>, unsigned int, msg::detail::with_const_default<unsigned int, 1>, msg::rel_matcher_t<std::equal_to<void>, msg::detail::field_t<sc::string_constant<char, 'f'>, unsigned int, msg::detail::with_default<unsigned int>, match::always_t, at<dword_index_t, msb_t, lsb_t>{0, 31, 24}>, 1>, at<dword_index_t, msb_t, lsb_t>{0, 31, 24}>>'
I[23:12:26.581] --> textDocument/publishDiagnostics
I[23:12:26.581] --> textDocument/inactiveRegions
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clangd    0x00000000004f680b
1  clangd    0x00000000004f464e
2  clangd    0x00000000004f7196
3  libc.so.6 0x00007f207aafd520
4  clangd    0x0000000000c4d020
5  clangd    0x0000000000c27f89
6  clangd    0x0000000000c4f4d4
7  clangd    0x0000000000c27bd6
8  clangd    0x0000000000c278eb
9  clangd    0x0000000000b4a1c5
10 clangd    0x0000000000b26bc5
11 clangd    0x0000000000aafaca
12 clangd    0x0000000000aabd0a
13 clangd    0x0000000000c6a483
14 clangd    0x0000000000c675c6
15 clangd    0x0000000000c2e7ec
16 clangd    0x0000000000c30268
17 clangd    0x0000000000ce359e
18 clangd    0x0000000000d28c6b
19 clangd    0x0000000000cd1112
20 clangd    0x0000000000cd087f
21 clangd    0x0000000000d4a49d
22 clangd    0x0000000000b1c91a
23 clangd    0x0000000000b1c5ac
24 clangd    0x0000000000b331c9
25 clangd    0x0000000000c4e57e
26 clangd    0x0000000000c27bd6
27 clangd    0x0000000000c2b9d6
28 clangd    0x0000000000b28f1c
29 clangd    0x0000000000b2cdc1
30 clangd    0x000000000236e390
31 clangd    0x00000000022a1058
32 clangd    0x00000000022a14ae
33 clangd    0x0000000002370a12
34 clangd    0x0000000002370069
35 clangd    0x0000000002370028
36 clangd    0x0000000002357e4a
37 clangd    0x0000000002357834
38 clangd    0x00000000023609e1
39 clangd    0x0000000002361f9a
40 clangd    0x000000000229e9f4
41 clangd    0x00000000022bbce2
42 clangd    0x000000000229d79d
43 clangd    0x000000000229d136
44 clangd    0x000000000229c2fe
45 clangd    0x000000000229a0d9
46 clangd    0x0000000002295cce
47 clangd    0x0000000001ee8cab
48 clangd    0x0000000001632900
49 clangd    0x0000000001635be2
50 clangd    0x000000000163945f
51 clangd    0x000000000163409a
52 clangd    0x00000000016a22a1
53 libc.so.6 0x00007f207ab4fac3
54 libc.so.6 0x00007f207abe1850

tried with clangd-15, clangd-18 and clangd-19, all crashed.

Leonezz commented 2 hours ago

backtrace:

Stack dump:
0.    /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:44: at annotation token
1.    /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:20: parsing function body 'main'
2.    /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:20: in compound statement ('{}')
3.    /home/xxx/compile-time-init-build/include/msg/message.hpp:297:60: instantiating class definition 'msg::detail::message<stdx::ct_string<9>{{"test_msg"}}, msg::detail::field_t<sc::string_constant<char, 'f'>, unsigned int, msg::detail::with_const_default<unsigned int, 1>, msg::rel_matcher_t<std::equal_to<void>, msg::detail::field_t<sc::string_constant<char, 'f'>, unsigned int, msg::detail::with_default<unsigned int>, match::always_t, at<dword_index_t, msb_t, lsb_t>{0, 31, 24}>, 1>, at<dword_index_t, msb_t, lsb_t>{0, 31, 24}>>'
I[23:12:26.581] --> textDocument/publishDiagnostics
I[23:12:26.581] --> textDocument/inactiveRegions
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clangd    0x00000000004f680b
1  clangd    0x00000000004f464e
2  clangd    0x00000000004f7196
3  libc.so.6 0x00007f207aafd520
4  clangd    0x0000000000c4d020
5  clangd    0x0000000000c27f89
6  clangd    0x0000000000c4f4d4
7  clangd    0x0000000000c27bd6
8  clangd    0x0000000000c278eb
9  clangd    0x0000000000b4a1c5
10 clangd    0x0000000000b26bc5
11 clangd    0x0000000000aafaca
12 clangd    0x0000000000aabd0a
13 clangd    0x0000000000c6a483
14 clangd    0x0000000000c675c6
15 clangd    0x0000000000c2e7ec
16 clangd    0x0000000000c30268
17 clangd    0x0000000000ce359e
18 clangd    0x0000000000d28c6b
19 clangd    0x0000000000cd1112
20 clangd    0x0000000000cd087f
21 clangd    0x0000000000d4a49d
22 clangd    0x0000000000b1c91a
23 clangd    0x0000000000b1c5ac
24 clangd    0x0000000000b331c9
25 clangd    0x0000000000c4e57e
26 clangd    0x0000000000c27bd6
27 clangd    0x0000000000c2b9d6
28 clangd    0x0000000000b28f1c
29 clangd    0x0000000000b2cdc1
30 clangd    0x000000000236e390
31 clangd    0x00000000022a1058
32 clangd    0x00000000022a14ae
33 clangd    0x0000000002370a12
34 clangd    0x0000000002370069
35 clangd    0x0000000002370028
36 clangd    0x0000000002357e4a
37 clangd    0x0000000002357834
38 clangd    0x00000000023609e1
39 clangd    0x0000000002361f9a
40 clangd    0x000000000229e9f4
41 clangd    0x00000000022bbce2
42 clangd    0x000000000229d79d
43 clangd    0x000000000229d136
44 clangd    0x000000000229c2fe
45 clangd    0x000000000229a0d9
46 clangd    0x0000000002295cce
47 clangd    0x0000000001ee8cab
48 clangd    0x0000000001632900
49 clangd    0x0000000001635be2
50 clangd    0x000000000163945f
51 clangd    0x000000000163409a
52 clangd    0x00000000016a22a1
53 libc.so.6 0x00007f207ab4fac3
54 libc.so.6 0x00007f207abe1850

tried with clangd-15, clangd-18 and clangd-19, all crashed.

Turns out I only tried on clangd-18, configure to clangd-19 works.

llvmbot commented 2 hours ago

@llvm/issue-subscribers-clangd

Author: zhuwenq (Leonezz)

backtrace: ``` Stack dump: 0. /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:44: at annotation token 1. /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:20: parsing function body 'main' 2. /home/xxx/compile-time-init-build/test/msg/fail/message_const_field_write.cpp:13:20: in compound statement ('{}') 3. /home/xxx/compile-time-init-build/include/msg/message.hpp:297:60: instantiating class definition 'msg::detail::message<stdx::ct_string<9>{{"test_msg"}}, msg::detail::field_t<sc::string_constant<char, 'f'>, unsigned int, msg::detail::with_const_default<unsigned int, 1>, msg::rel_matcher_t<std::equal_to<void>, msg::detail::field_t<sc::string_constant<char, 'f'>, unsigned int, msg::detail::with_default<unsigned int>, match::always_t, at<dword_index_t, msb_t, lsb_t>{0, 31, 24}>, 1>, at<dword_index_t, msb_t, lsb_t>{0, 31, 24}>>' I[23:12:26.581] --> textDocument/publishDiagnostics I[23:12:26.581] --> textDocument/inactiveRegions Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 clangd 0x00000000004f680b 1 clangd 0x00000000004f464e 2 clangd 0x00000000004f7196 3 libc.so.6 0x00007f207aafd520 4 clangd 0x0000000000c4d020 5 clangd 0x0000000000c27f89 6 clangd 0x0000000000c4f4d4 7 clangd 0x0000000000c27bd6 8 clangd 0x0000000000c278eb 9 clangd 0x0000000000b4a1c5 10 clangd 0x0000000000b26bc5 11 clangd 0x0000000000aafaca 12 clangd 0x0000000000aabd0a 13 clangd 0x0000000000c6a483 14 clangd 0x0000000000c675c6 15 clangd 0x0000000000c2e7ec 16 clangd 0x0000000000c30268 17 clangd 0x0000000000ce359e 18 clangd 0x0000000000d28c6b 19 clangd 0x0000000000cd1112 20 clangd 0x0000000000cd087f 21 clangd 0x0000000000d4a49d 22 clangd 0x0000000000b1c91a 23 clangd 0x0000000000b1c5ac 24 clangd 0x0000000000b331c9 25 clangd 0x0000000000c4e57e 26 clangd 0x0000000000c27bd6 27 clangd 0x0000000000c2b9d6 28 clangd 0x0000000000b28f1c 29 clangd 0x0000000000b2cdc1 30 clangd 0x000000000236e390 31 clangd 0x00000000022a1058 32 clangd 0x00000000022a14ae 33 clangd 0x0000000002370a12 34 clangd 0x0000000002370069 35 clangd 0x0000000002370028 36 clangd 0x0000000002357e4a 37 clangd 0x0000000002357834 38 clangd 0x00000000023609e1 39 clangd 0x0000000002361f9a 40 clangd 0x000000000229e9f4 41 clangd 0x00000000022bbce2 42 clangd 0x000000000229d79d 43 clangd 0x000000000229d136 44 clangd 0x000000000229c2fe 45 clangd 0x000000000229a0d9 46 clangd 0x0000000002295cce 47 clangd 0x0000000001ee8cab 48 clangd 0x0000000001632900 49 clangd 0x0000000001635be2 50 clangd 0x000000000163945f 51 clangd 0x000000000163409a 52 clangd 0x00000000016a22a1 53 libc.so.6 0x00007f207ab4fac3 54 libc.so.6 0x00007f207abe1850 ``` tried with clangd-15, clangd-18 and clangd-19, all crashed.