Skip to content

v0.4.8 crashes indexing Canvas LMS on empty parent relationship symbol #260

Description

@alexdemeo

Input

  • Repository: https://github.com/instructure/canvas-lms
  • Commit: 1c9f0bb8013ed69c4f2efe11fd483025469b7e6c
  • Platform: GitHub Actions ubuntu-latest, x86_64
  • scip-ruby: scip-ruby-v0.4.8
  • The repository has no sorbet/config.

Reproduction

From the repository root:

curl -fsSLO https://github.com/sourcegraph/scip-ruby/releases/download/scip-ruby-v0.4.8/scip-ruby-asserts-x86_64-linux
chmod +x scip-ruby-asserts-x86_64-linux
./scip-ruby-asserts-x86_64-linux --index-file index.scip .

The ordinary scip-ruby-x86_64-linux release binary exits on signal 11. The assertions build makes the failure actionable and exits on signal 4:

Exception::raise(): scip_indexer/SCIPSymbolRef.cc:145 enforced condition !rel.symbol().empty() has failed

Backtrace:
  UntypedGenericSymbolRef::saveParentRelationships()
  SCIPState::saveParentRelationships()
  SCIPState::saveDefinition()
  CFGTraversal::emitLocalOccurrence()
  CFGTraversal::traverse()
  SCIPSemanticExtension::typecheck()

spec/models/assignment_spec.rb:13269: Failed to process tree

The same invariant failure is emitted for many files before the process exits, including spec/apis/v1/assignments_api_spec.rb, spec/models/submission_spec.rb, and spec/models/course_spec.rb.

Expected

Indexing completes, or unsupported source constructs are skipped with diagnostics instead of terminating the indexer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions