Skip to content
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

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

Open
swift-ci opened this issue Sep 25, 2020 · 2 comments
Open

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

swift-ci opened this issue Sep 25, 2020 · 2 comments

Comments

@swift-ci
Copy link

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

@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Author

Comment by Paweł Madej (JIRA)

edited 2 steps because they were wrong. above flow describes fully bug

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants