Uploaded image for project: 'Swift'
  1. Swift
  2. SR-755

[Linux] Stack traces do not include debug symbols

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: None
    • Labels:
    • Environment:

      Linux x64
      swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a

      Description

      A recent Swift snapshot added stack traces for e.g. fatalError. However, these stack traces do not support debug symbols The behavior is verified correct on OSX, so this bug is Linux-specific.

      $ cat test.swift
      func doesNotAppearInStackTrace() {
          fatalError("Does this function appear in the stack trace?")
      }
      doesNotAppearInStackTrace()
      
      swiftc -g test.swift && ./test
      fatal error: Does this function appear in the stack trace?: file test.swift, line 2
      Current stack trace:
      /usr/local/lib/swift/linux/libswiftCore.so(swift_reportError+0x8b) [0x7f8ef4700e4b]
      /usr/local/lib/swift/linux/libswiftCore.so(_swift_stdlib_reportFatalErrorInFile+0x71) [0x7f8ef47125e1]
      /usr/local/lib/swift/linux/libswiftCore.so(+0x2861bc) [0x7f8ef465f1bc]
      /usr/local/lib/swift/linux/libswiftCore.so(+0x2864fb) [0x7f8ef465f4fb]
      /usr/local/lib/swift/linux/libswiftCore.so(function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Exploded> of Swift._assertionFailed (Swift.StaticString, Swift.String, Swift.StaticString, Swift.UInt, flags : Swift.UInt32) -> ()+0x75) [0x7f8ef465f645]
      ./test() [0x400b69]
      ./test() [0x400aa1]
      /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f8ef382db45]
      ./test() [0x400989]
      Illegal instruction
      

      Expected: test symbols should appear in this stack trace

      Actual: symbols are given for all modules except test.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              drewcrawford Drew Crawford
            • Votes:
              7 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated: