swiftlang / swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence
swift.org
Apache License 2.0
5.27k stars 1.13k forks source link

[SR-9386] Cannot use URL on armv7 #3581

Open Bouke opened 5 years ago

Bouke commented 5 years ago
Previous ID SR-9386
Radar None
Original Reporter @Bouke
Type Bug
Environment Swift version 4.1.1 (swift-4.1.1-RELEASE) Target: armv7-unknown-linux-gnueabihf
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug, 32BitOnly, Linux, armv7 | |Assignee | None | |Priority | Medium | md5: e1b2734f416bbcc5c09d944dd6a3f189

Issue Description:

I have the following test file:

import Foundation
let url = URL(fileURLWithPath: "url.swift")
print("created, printing...")
print("\(url)")

When running this on armv7 architecture (Pi3 / raspbian stretch), it sometimes segfaults:

pi@pi3:~ $ swift url.swift
created, printing...
/home/pi/url.swift

pi@pi3:~ $ swift url.swift
created, printing...
Stack dump:0. Program arguments: /usr/bin/swift -frontend -interpret url.swift -disable-objc-interop -color-diagnostics -module-name urlSegmentation fault 
belkadan commented 5 years ago

Yikes. Obligatory warning that armv7 Linux is not a supported platform at this time, but someone's gonna need to look into it. (Well, unless it's already been fixed in Swift 4.2.)

Bouke commented 5 years ago

I'm now using a build created from 4.1.2 by the ARM community and this issue doesn't appear. However due to the amount of patches applied, I'm not sure if this is fixed in master.