8000 Some SWIFT_BACKTRACE options print a warning despite taking effect · Issue #81800 · swiftlang/swift · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Some SWIFT_BACKTRACE options print a warning despite taking effect #81800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
czechboy0 opened this issue May 28, 2025 · 2 comments
Closed

Some SWIFT_BACKTRACE options print a warning despite taking effect #81800

czechboy0 opened this issue May 28, 2025 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@czechboy0
Copy link
Member

Description

Tested on Linux, Swift 6.1.

For example, when I specify:

SWIFT_BACKTRACE=interactive=no,color=no,sanitize=no,threads=all,registers=all,images=all,output-to=/logs,format=json,symbolicate=fast

The launched process prints:

swift runtime: unknown output-to setting '/logs'
swift runtime: unknown backtracing setting 'format'
swift runtime: unknown backtracing setting 'symbolicate'

Reproduction

SWIFT_BACKTRACE=interactive=no,color=no,sanitize=no,threads=all,registers=all,images=all,output-to=/logs,format=json,symbolicate=fast
./any-swift-program-build-with-6.1-on-linux

Expected behavior

No warnings printed. Again, the options do take effect, so fixing this will just avoid confusion.

Environment

Swift version 6.1 (swift-6.1-RELEASE)
Target: aarch64-unknown-linux-gnu

Additional information

No response

@czechboy0 czechboy0 added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels May 28, 2025
@al45tair
Copy link
Contributor
al45tair commented Jun 4, 2025

I tried this with the swift:6.1-jammy Docker image and I'm unable to reproduce this problem:

$ mkdir /logs
$ cat > tst.swift
func reallyCrash() {
  let ptr = UnsafeMutablePointer<Int>(bitPattern: 4)!
  ptr.pointee = 42
}

func crash() {
  reallyCrash()
}

@main
struct Hello {
  static func main() {
    print("Hello World")
    crash()
  }
}
$ SWIFT_BACKTRACE=interactive=no,color=no,sanitize=no,threads=all,registers=all,images=all,output-to=/logs,format=json,symbolicate=fast ./tst
Hello World

*** Signal 11: Backtracing from 0xaaaac2f80fa0... done ***

Segmentation fault
$ ls /logs
tst-638-0.0.json

@al45tair
Copy link
Contributor
al45tair commented Jun 4, 2025

Closing for now as we can't seem to reproduce it.

@al45tair al45tair closed this as completed Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

2 participants
0