realm / realm/SwiftLint

When scanning apple/swift, linting multiple files fails with a bus error

Open
#4,829 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

New Issue Checklist
Describe the bug
brew install swiftlint
git clone https://github.com/apple/swift
cd swift
swiftlint validation-test/compiler_crashers_fixed/28616-swift-parser-parseexprsequence-swift-diag-bool-bool.swift
Linting Swift files at paths validation-test/compiler_crashers_fixed/28616-swift-parser-parseexprsequence-swift-diag-bool-bool.swift
Linting '28616-swift-parser-parseexprsequence-swift-diag-bool-bool.swift' (1/1)
zsh: bus error  swiftlint 

The following files are affected:

validation-test/compiler_crashers_fixed/28678-result-case-not-implemented.swift
validation-test/compiler_crashers_fixed/28616-swift-parser-parseexprsequence-swift-diag-bool-bool.swift
validation-test/compiler_crashers_2_fixed/parser-cutoff.swift
test/Parse/structure_no_overflow.swift
test/Parse/structure_overflow.swift
test/SourceKit/Misc/parser-cutoff.swift

This may be a problem with SourceKit/SourceKitten:

Screenshot 2023-03-19 at 12 55 32
Complete output when running SwiftLint, including the stack trace and command used

See above

Environment
  • SwiftLint version (run swiftlint version to be sure)? 0.50.3
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? homebrew
  • Paste your configuration file:

none

Xcode 14.2
Build version 14C18
  • Do you have a sample that shows the issue?

See above for sample files that cause the issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the bus error with SwiftLint 0.50.3 using the command in the report and the listed Swift files, starting with validation-test/compiler_crashers_fixed/28616-swift-parser-parseexprsequence-swift-diag-bool-bool.swift. Investigate the possible SourceKit/SourceKitten involvement and compare behavior across the affected parser and SourceKit test files. Done means linting the affected files no longer exits with a bus error.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.