Skip to content

[SR-1837] test/Runtime/backtrace.swift should be disabled on Android #44446

@modocache

Description

@modocache
mannequin
Previous ID SR-1837
Radar None
Original Reporter @modocache
Type Task
Additional Detail from JIRA
Votes 0
Component/s
Labels Task, Android, StarterBug
Assignee None
Priority Medium

md5: 39669a7192d32d5afd9e59590d8db749

Issue Description:

As far as I recall, libunwind isn't available as part of the Android NDK, so the part of the Swift runtime that normally emits backtraces is ifdef'd out when compiling for Android. As a result, I assume the test/Runtime/backtrace.swift would almost certainly fail on Android – it should be disabled.

Prerequisites:

  • An Ubuntu 15.10 development environment capable of building Swift from source.

  • A physical Android device.

Helpful skills:
Basic knowledge of C++ would help, but isn't necessary.

Starting point:

  1. Follow the instructions in docs/Android.md to build and run the test suite on a physical Android device. Confirm this test still fails.

  2. Backtraces appear to be disabled on Android: https://github.com/apple/swift/blob/91ffcd79a7765f631f2aef207167f5da5792cfc5/stdlib/public/runtime/Errors.cpp#L17-L21 – Confirm this is still the case by reading through how that macro is used in that file.

  3. Read through test/Runtime/backtrace.swift, confirm that it does indeed test backtraces. If it does, add an unsupported: or requires: flag to the top of test/Runtime/backtrace.swift to keep it from running on platforms that don't support backtraces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions