Skip to content

[SR-13610] Test passes on macOS and crashes (not fails) on Linux #349

Open
@swift-ci

Description

@swift-ci
Previous ID SR-13610
Radar rdar://problem/69574788
Original Reporter PawelMadej (JIRA User)
Type Bug
Environment

Ubuntu Linux 18.04

Swift 5.2.4 and 5.3

Additional Detail from JIRA
Votes 0
Component/s XCTest
Labels Bug
Assignee None
Priority Medium

md5: 6f2d5ddf55e814cc0d06308ed989de6c

Issue Description:

Steps to reproduce:

1. clone this repo on linux http://github.com/nysander/twitter-text branch main

2. run

swift test --enable-test-discovery --filter "testExtract"

test will crash

Test Suite 'Selected tests' started at 2020-09-25 15:13:32.087
Test Suite 'TwitterTextTests' started at 2020-09-25 15:13:32.090
Test Case 'TwitterTextTests.testExtract' started at 2020-09-25 15:13:32.090
free(): invalid pointer
Exited with signal code 6

3. checkout branch main

replace line:https://github.com/nysander/twitter-text/blob/011711c6a34af351d83eed143d094fe67d5109ef/Tests/TwitterTextTests/TwitterTextTests.swift#L268

with

var counter = 0
for testCase in urls {
    counter += 1
    print(counter)
// rest without change

4. run test again - test passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions