-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Labels
Description
A couple of questions first
- Your IDE/editor (e.g. vscode, emacs,...) you use with verible LSP ? Neovim 0.8
- IDE version:
- What other SystemVerilog plugins are active alongside ?
What activity failed
Select "`pk" at the third line, and perform range formatting. The LSP message is as follows:
{
"jsonrpc": "2.0",
"id": 5,
"method": "textDocument/rangeFormatting",
"params": {
"textDocument": {
"uri": "file:///tmp/export6/id_93_time_58072_exec_2312029/workspace/main.svh"
},
"range": {
"start": {
"line": 2,
"character": 9
},
"end": {
"line": 2,
"character": 11
}
},
"options": {
"tabSize": 8,
"insertSpaces": false,
"trimTrailingWhitespace": true,
"insertFinalNewline": true,
"trimFinalNewlines": false
}
}
}
Expectation
It should not crash (probably not doing anything?)
What actually happened
It crashes
Test case
If needed, include SystemVerilog sample file(s) that show the code you want to do an operation on
module
result;
reg [ `pkg2(): ytype_id::create("0x%d\n")] handle1 = new(num, my_function("%x", hex));
endmodule
Logfiles
If you invoke your editor with the environment variable VERIBLE_LOGTHRESHOLD
set to 0, then useful log information will
be generated that you can include here
export VERIBLE_LOGTHRESHOLD=0
code foo.sv
How to see the log output
- vscode: go to
View -> Output
, then chooseVerible Language Server
in the dropdown - emacs: there is a buffer
*verible-ls::stderr*
that contains the log output - kate: output is printed on the terminal
Verible Verilog Language Server built at head
commandline: /src/target/verible-verilog-ls
I0526 09:39:50.172214 607 verilog-language-server.cc:240] Initializing with project-root '/tmp/export6/id_93_time_58072_exec_2312029/workspace/'
I0526 09:39:50.172510 607 symbol-table-handler.cc:104] Could not find verible.filelist file in the project root (/tmp/export6/id_93_time_58072_exec_2312029/workspace/): NOT_FOUND: UpwardFileSearch: starting from '/tmp/export6/id_93_time_58072_exec_2312029/workspace/', no file 'verible.filelist' found'
Content-Length: 516
{"id":0,"jsonrpc":"2.0","result":{"capabilities":{"codeActionProvider":true,"definitionProvider":true,"diagnosticProvider":{"interFileDependencies":false,"workspaceDiagnostics":false},"documentFormattingProvider":true,"documentHighlightProvider":true,"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"hoverProvider":false,"referencesProvider":true,"renameProvider":true,"textDocumentSync":{"change":2,"openClose":true}},"serverInfo":{"name":"Verible Verilog language server.","version":"head"}}}
I0526 09:39:50.173114 607 json-rpc-dispatcher.cc:72] Ignoring notification 'initialized'
Content-Length: 632
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"message":"Remove trailing spaces. [Style: trailing-spaces][no-trailing-spaces] (fix available)","range":{"end":{"character":7,"line":0},"start":{"character":6,"line":0}},"severity":2,"source":"verible"},{"message":"Declared module does not match the first dot-delimited component of file name: \"main\" [Style: file-names][module-filename] (fix available)","range":{"end":{"character":11,"line":1},"start":{"character":5,"line":1}},"severity":2,"source":"verible"}],"uri":"file:///tmp/export6/id_93_time_58072_exec_2312029/workspace/main.svh"}}
F0526 09:39:50.179782 607 token-partition-tree.cc:467] Check failed: target_leaf->Value().TokensRange().end() == leaf->Value().TokensRange().begin()
*** Check failure stack trace: ***
@ 0xa57a26 absl::lts_20240116::log_internal::LogMessage::Flush()
@ 0xa582ab absl::lts_20240116::log_internal::LogMessageFatal::~LogMessageFatal()
@ 0x8af86a verible::MergeLeafIntoPreviousLeaf()
@ 0x8311a8 verilog::formatter::TreeUnwrapper::ReshapeTokenPartitions()
@ 0x824b11 verilog::formatter::TreeUnwrapper::Visit()
@ 0x88b6ac verible::TreeUnwrapper::TraverseChildren()
@ 0x82bb74 verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions()
@ 0x824a7c verilog::formatter::TreeUnwrapper::Visit()
@ 0x88b6ac verible::TreeUnwrapper::TraverseChildren()
@ 0x88be19 verible::TreeUnwrapper::VisitIndentedChildren()
@ 0x82a241 verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions()
@ 0x824a7c verilog::formatter::TreeUnwrapper::Visit()
@ 0x88b6ac verible::TreeUnwrapper::TraverseChildren()
@ 0x88be19 verible::TreeUnwrapper::VisitIndentedChildren()
@ 0x82a5a3 verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions()
@ 0x824a7c verilog::formatter::TreeUnwrapper::Visit()
@ 0x88b6ac verible::TreeUnwrapper::TraverseChildren()
@ 0x88be19 verible::TreeUnwrapper::VisitIndentedChildren()
@ 0x82a50b verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions()
@ 0x824a7c verilog::formatter::TreeUnwrapper::Visit()
@ 0x88b6ac verible::TreeUnwrapper::TraverseChildren()
@ 0x82b38f verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions()
@ 0x824a7c verilog::formatter::TreeUnwrapper::Visit()
@ 0x889421 verible::TreeUnwrapper::Unwrap()
@ 0x7db1cc verilog::formatter::Formatter::Format()
@ 0x7e9b90 verilog::formatter::FormatVerilogRange()
@ 0x5c618e verilog::FormatRange()
@ 0x59aaa0 std::_Function_handler<>::_M_invoke()
@ 0x8ea79f verible::lsp::JsonRpcDispatcher::CallRequestHandler()
@ 0x8e6a83 verible::lsp::JsonRpcDispatcher::DispatchMessage()
@ 0x917c12 verible::lsp::MessageStreamSplitter::ProcessContainedMessages()
@ 0x91729b verible::lsp::MessageStreamSplitter::ReadInput()
@ 0x5b8b23 verilog::VerilogLanguageServer::Run()
@ 0x585ad8 main
@ 0x7ffff7aab5d0 __libc_start_call_main
AddressSanitizer:DEADLYSIGNAL
=================================================================
==607==ERROR: AddressSanitizer: ABRT on unknown address 0x00000000025f (pc 0x7ffff7b0d53c bp 0x00000000025f sp 0x7fffffffc220 T0)
#0 0x7ffff7b0d53c in __pthread_kill_implementation (/lib64/libc.so.6+0x8b53c) (BuildId: fc46bc419367003d0e4e399cbe22aade4a1ee7be)
#1 0x7ffff7ac0685 in gsignal (/lib64/libc.so.6+0x3e685) (BuildId: fc46bc419367003d0e4e399cbe22aade4a1ee7be)
#2 0x7ffff7aaa832 in abort (/lib64/libc.so.6+0x28832) (BuildId: fc46bc419367003d0e4e399cbe22aade4a1ee7be)
#3 0xa57e5d in absl::lts_20240116::log_internal::LogMessage::FailWithoutStackTrace() /proc/self/cwd/external/abseil-cpp~20240116.2/absl/log/internal/log_message.cc:340:3
#4 0xa57c99 in absl::lts_20240116::log_internal::LogMessage::Die() /proc/self/cwd/external/abseil-cpp~20240116.2/absl/log/internal/log_message.cc:497:5
#5 0xa57c99 in absl::lts_20240116::log_internal::LogMessage::SendToLog() /proc/self/cwd/external/abseil-cpp~20240116.2/absl/log/internal/log_message.cc:506:18
#6 0xa57c99 in absl::lts_20240116::log_internal::LogMessage::Flush() /proc/self/cwd/external/abseil-cpp~20240116.2/absl/log/internal/log_message.cc:418:3
#7 0xa582aa in absl::lts_20240116::log_internal::LogMessageFatal::~LogMessageFatal() /proc/self/cwd/external/abseil-cpp~20240116.2/absl/log/internal/log_message.cc:597:3
#8 0x8af869 in verible::MergeLeafIntoPreviousLeaf(verible::VectorTree<verible::UnwrappedLine>*) /proc/self/cwd/verible/common/formatting/token-partition-tree.cc:466:3
#9 0x8311a7 in verilog::formatter::TreeUnwrapper::ReshapeTokenPartitions(verible::SyntaxTreeNode const&, verilog::formatter::FormatStyle const&, verible::VectorTree<verible::UnwrappedLine>*) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc
#10 0x824b10 in verilog::formatter::TreeUnwrapper::Visit(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:668:5
#11 0x88b6ab in verible::TreeUnwrapper::TraverseChildren(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:282:14
#12 0x82bb73 in verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc
#13 0x824a7b in verilog::formatter::TreeUnwrapper::Visit(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:660:3
#14 0x88b6ab in verible::TreeUnwrapper::TraverseChildren(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:282:14
#15 0x88be18 in verible::TreeUnwrapper::VisitIndentedChildren(verible::SyntaxTreeNode const&, int, verible::PartitionPolicyEnum) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:309:3
#16 0x82a240 in verible::TreeUnwrapper::VisitIndentedSection(verible::SyntaxTreeNode const&, int, verible::PartitionPolicyEnum) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:325:7
#17 0x82a240 in verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:868:7
#18 0x824a7b in verilog::formatter::TreeUnwrapper::Visit(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:660:3
#19 0x88b6ab in verible::TreeUnwrapper::TraverseChildren(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:282:14
#20 0x88be18 in verible::TreeUnwrapper::VisitIndentedChildren(verible::SyntaxTreeNode const&, int, verible::PartitionPolicyEnum) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:309:3
#21 0x82a5a2 in verible::TreeUnwrapper::VisitIndentedSection(verible::SyntaxTreeNode const&, int, verible::PartitionPolicyEnum) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:325:7
#22 0x82a5a2 in verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:1318:7
#23 0x824a7b in verilog::formatter::TreeUnwrapper::Visit(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:660:3
#24 0x88b6ab in verible::TreeUnwrapper::TraverseChildren(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:282:14
#25 0x88be18 in verible::TreeUnwrapper::VisitIndentedChildren(verible::SyntaxTreeNode const&, int, verible::PartitionPolicyEnum) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:309:3
#26 0x82a50a in verible::TreeUnwrapper::VisitIndentedSection(verible::SyntaxTreeNode const&, int, verible::PartitionPolicyEnum) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:325:7
#27 0x82a50a in verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:888:7
#28 0x824a7b in verilog::formatter::TreeUnwrapper::Visit(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:660:3
#29 0x88b6ab in verible::TreeUnwrapper::TraverseChildren(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:282:14
#30 0x82b38e in verilog::formatter::TreeUnwrapper::SetIndentationsAndCreatePartitions(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:726:7
#31 0x824a7b in verilog::formatter::TreeUnwrapper::Visit(verible::SyntaxTreeNode const&) /proc/self/cwd/verible/verilog/formatting/tree-unwrapper.cc:660:3
#32 0x889420 in verible::TreeUnwrapper::Unwrap() /proc/self/cwd/verible/common/formatting/tree-unwrapper.cc:79:56
#33 0x7db1cb in verilog::formatter::Formatter::Format(verilog::formatter::ExecutionControl const&) /proc/self/cwd/verible/verilog/formatting/formatter.cc:835:47
#34 0x7e9b8f in verilog::formatter::FormatVerilogRange(verible::TextStructureView const&, verilog::formatter::FormatStyle const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, verible::Interval<int> const&, verilog::formatter::ExecutionControl const&) /proc/self/cwd/verible/verilog/formatting/formatter.cc:319:30
#35 0x5c618d in verilog::FormatRange(verilog::BufferTracker const*, verible::lsp::DocumentFormattingParams const&) /proc/self/cwd/verible/verilog/tools/ls/verible-lsp-adapter.cc:299:10
#36 0x59aa9f in verilog::VerilogLanguageServer::SetRequestHandlers()::$_5::operator()(verible::lsp::DocumentFormattingParams const&) const /proc/self/cwd/verible/verilog/tools/ls/verilog-language-server.cc:144:16
#37 0x59aa9f in std::vector<verible::lsp::TextEdit, std::allocator<verible::lsp::TextEdit>> std::__invoke_impl<std::vector<verible::lsp::TextEdit, std::allocator<verible::lsp::TextEdit>>, verilog::VerilogLanguageServer::SetRequestHandlers()::$_5&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(std::__invoke_other, verilog::VerilogLanguageServer::SetRequestHandlers()::$_5&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/invoke.h:61:14
#38 0x59aa9f in std::enable_if<is_invocable_r_v<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, verilog::VerilogLanguageServer::SetRequestHandlers()::$_5&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::type std::__invoke_r<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, verilog::VerilogLanguageServer::SetRequestHandlers()::$_5&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(verilog::VerilogLanguageServer::SetRequestHandlers()::$_5&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/invoke.h:114:9
#39 0x59aa9f in std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> (nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&), verilog::VerilogLanguageServer::SetRequestHandlers()::$_5>::_M_invoke(std::_Any_data const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:290:9
#40 0x8ea79e in std::function<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> (nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:591:9
#41 0x8ea79e in verible::lsp::JsonRpcDispatcher::CallRequestHandler(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) /proc/self/cwd/verible/common/lsp/json-rpc-dispatcher.cc:98:33
#42 0x8e6a82 in verible::lsp::JsonRpcDispatcher::DispatchMessage(std::basic_string_view<char, std::char_traits<char>>) /proc/self/cwd/verible/common/lsp/json-rpc-dispatcher.cc:54:15
#43 0x917c11 in std::function<void (std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>)>::operator()(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) const /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/std_function.h:591:9
#44 0x917c11 in verible::lsp::MessageStreamSplitter::ProcessContainedMessages(std::basic_string_view<char, std::char_traits<char>>*) /proc/self/cwd/verible/common/lsp/message-stream-splitter.cc:98:5
#45 0x91729a in verible::lsp::MessageStreamSplitter::ReadInput(std::function<int (char*, int)> const&) /proc/self/cwd/verible/common/lsp/message-stream-splitter.cc:141:3
#46 0x5b8b22 in verible::lsp::MessageStreamSplitter::PullFrom(std::function<int (char*, int)> const&) /proc/self/cwd/verible/common/lsp/message-stream-splitter.cc:36:10
#47 0x5b8b22 in verilog::VerilogLanguageServer::Step(std::function<int (char*, int)> const&) /proc/self/cwd/verible/verilog/tools/ls/verilog-language-server.cc:190:27
#48 0x5b8b22 in verilog::VerilogLanguageServer::Run(std::function<int (char*, int)> const&) /proc/self/cwd/verible/verilog/tools/ls/verilog-language-server.cc:197:14
#49 0x585ad7 in main /proc/self/cwd/verible/verilog/tools/ls/verible-verilog-ls.cc:69:32
#50 0x7ffff7aab5cf in __libc_start_call_main (/lib64/libc.so.6+0x295cf) (BuildId: fc46bc419367003d0e4e399cbe22aade4a1ee7be)
#51 0x7ffff7aab67f in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2967f) (BuildId: fc46bc419367003d0e4e399cbe22aade4a1ee7be)
#52 0x4ab624 in _start (/src/target/verible-verilog-ls+0x4ab624) (BuildId: c7b5ca6b06003bcb)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: ABRT (/lib64/libc.so.6+0x8b53c) (BuildId: fc46bc419367003d0e4e399cbe22aade4a1ee7be) in __pthread_kill_implementation
==607==ABORTING