Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in go_to_type_definition.cc (sorbet#6135)
* Add a failing test + exec test/lsp_test_runner --single_test=test/testdata/lsp/go_to_type_definition.rb Pausing Resuming [doctest] doctest version is "2.4.1" [doctest] run with "--help" for options [2022-08-01 22:09:09.445] [fatalFallback] [error] Exception::raise(): ./core/TypePtr.h:223 enforced condition store != 0 has failed: (no message provided) [2022-08-01 22:09:09.490] [fatalFallback] [error] Backtrace: #3 0xc859b2 #4 0xdbc197 sorbet::core::TypePtr::tag() #5 0xef9fe7 sorbet::realmain::lsp::(anonymous namespace)::locsForType()::$_13::operator()() #6 0xef95d3 sorbet::typecaseHelper<>() #7 0xef8f85 sorbet::typecase<>() #8 0xef8b0a sorbet::realmain::lsp::(anonymous namespace)::locsForType() #9 0xef859f sorbet::realmain::lsp::TypeDefinitionTask::runRequest() #10 0xda699c sorbet::realmain::lsp::LSPRequestTask::run() #11 0xf160f4 sorbet::realmain::lsp::(anonymous namespace)::TypecheckerTask::run() #12 0xf1454e sorbet::realmain::lsp::LSPTypecheckerCoordinator::asyncRunInternal() #13 0xf14620 sorbet::realmain::lsp::LSPTypecheckerCoordinator::syncRun() #14 0xf12d44 sorbet::realmain::lsp::LSPLoop::runTask() #15 0xf12698 sorbet::realmain::lsp::LSPLoop::processRequests() #16 0xf0410d sorbet::realmain::lsp::SingleThreadedLSPWrapper::getLSPResponsesFor() #17 0xcbf398 sorbet::test::getLSPResponsesFor() #18 0xcbcece sorbet::test::getLSPResponsesFor() #19 0xcf1709 sorbet::test::TypeDefAssertion::check() #20 0xbbff18 sorbet::test::_DOCTEST_ANON_FUNC_71() #21 0x1d060a9 doctest::Context::run() #22 0xbc2380 main #23 0x7f162d27c083 __libc_start_main #24 0xbb34ae _start [2022-08-01 22:09:09.496] [fatalFallback] [error] Backtrace: #3 0x1d8f6e8 std::terminate() #4 0xbcb94b #5 0xdbc1c9 #6 0xef9fe7 sorbet::realmain::lsp::(anonymous namespace)::locsForType()::$_13::operator()() #7 0xef95d3 sorbet::typecaseHelper<>() #8 0xef8f85 sorbet::typecase<>() #9 0xef8b0a sorbet::realmain::lsp::(anonymous namespace)::locsForType() #10 0xef859f sorbet::realmain::lsp::TypeDefinitionTask::runRequest() #11 0xda699c sorbet::realmain::lsp::LSPRequestTask::run() #12 0xf160f4 sorbet::realmain::lsp::(anonymous namespace)::TypecheckerTask::run() #13 0xf1454e sorbet::realmain::lsp::LSPTypecheckerCoordinator::asyncRunInternal() #14 0xf14620 sorbet::realmain::lsp::LSPTypecheckerCoordinator::syncRun() #15 0xf12d44 sorbet::realmain::lsp::LSPLoop::runTask() #16 0xf12698 sorbet::realmain::lsp::LSPLoop::processRequests() #17 0xf0410d sorbet::realmain::lsp::SingleThreadedLSPWrapper::getLSPResponsesFor() #18 0xcbf398 sorbet::test::getLSPResponsesFor() #19 0xcbcece sorbet::test::getLSPResponsesFor() #20 0xcf1709 sorbet::test::TypeDefAssertion::check() #21 0xbbff18 sorbet::test::_DOCTEST_ANON_FUNC_71() #22 0x1d060a9 doctest::Context::run() #23 0xbc2380 main #24 0x7f162d27c083 __libc_start_main #25 0xbb34ae _start libc++abi: terminate_handler unexpectedly returned =============================================================================== test/lsp_test_runner.cc:497: TEST CASE: LSPTest test/lsp_test_runner.cc:497: FATAL ERROR: test case CRASHED: SIGABRT - Abort (abnormal termination) signal * Set type to untyped if null
- Loading branch information