jeremyp
(Jeremy Pereira)
March 22, 2016, 3:29pm
1
So I installed Xcode 7.3 and now I see this segmentation fault
https://bugs.swift.org/browse/SR-89
Does anybody know of a work around?
rlovelett
(Ryan Lovelett)
March 22, 2016, 8:40pm
2
So I installed Xcode 7.3 and now I see this segmentation fault
[SR-89] Segfault importing sqlite3.h from system module · Issue #63626 · apple/swift · GitHub
Does anybody know of a work around?
It looks like a work-around was posted on the thread. Have you tried
that?
opened 10:40AM - 06 Dec 15 UTC
bug
compiler
| | |
|------------------|-----------------|…
|Previous ID | SR-89 |
|Radar | rdar://problem/26866326 |
|Original Reporter | m.buhot (JIRA User) |
|Type | Bug |
Attachment: [Download](https://user-images.githubusercontent.com/2727770/164961033-c033ccfe-a4ac-45ab-9caa-43c85a6eabed.gz)
<details>
<summary>Environment</summary>
OSX 10.11.1 (15B42)
swift-2.2-SNAPSHOT-2015-12-01-a-osx
</details>
<details>
<summary>Additional Detail from JIRA</summary>
| | |
|------------------|-----------------|
|Votes | 0 |
|Component/s | Compiler, llbuild |
|Labels | Bug |
|Assignee | @benlangmuir |
|Priority | Medium |
md5: 6256508fb06b830feeade0377fd99c27
</details>
**relates to**:
* [SR-1567](https://bugs.swift.org/browse/SR-1567) [SwiftPM] Prevent/solve issue with seeing headers in /usr/include and SDK (was: compiler crash when passing `-Xcc -I/usr/include` to swiftc)
**Issue Description:**
Trying to build a trivial application (sources attached) that imports sqlite3.h from a system module causes the segfault output below.
``` java
$ swift build -v
Cloning into '/Users/mbuhot/source/app/Packages/CSqlite3'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
Checking connectivity... done.
/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc -module-name app -incremental -emit-dependencies -emit-module -emit-module-path /Users/mbuhot/source/app/.build/debug/app.swiftmodule -output-file-map /Users/mbuhot/source/app/.build/debug/app.o/app/output-file-map.json -c /Users/mbuhot/source/app/main.swift -I /Users/mbuhot/source/app/.build/debug -j8 -Onone -g -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Xcc -F-module-map=/Users/mbuhot/source/app/Packages/CSqlite3-1.0.0/module.modulemap -I /Users/mbuhot/source/app/Packages/CSqlite3-1.0.0 -I /usr/local/include
0 swift 0x000000010fbfa47b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x000000010fbf9916 llvm::sys::RunSignalHandlers() + 70
2 swift 0x000000010fbfaaa3 SignalHandler(int) + 243
3 libsystem_platform.dylib 0x00007fff8d25852a _sigtramp + 26
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 1926920944
5 swift 0x000000010e41502d clang::Preprocessor::MacroState::getModuleInfo(clang::Preprocessor&, clang::IdentifierInfo const*) const + 189
6 swift 0x000000010e414a76 clang::Preprocessor::getMacroDefinition(clang::IdentifierInfo const*) + 326
7 swift 0x000000010ed82e50 clang::Preprocessor::HandleIdentifier(clang::Token&) + 320
8 swift 0x000000010ed2c4f4 clang::Lexer::LexIdentifier(clang::Token&, char const*) + 932
9 swift 0x000000010ed32312 clang::Lexer::LexTokenInternal(clang::Token&, bool) + 8562
10 swift 0x000000010ed834c4 clang::Preprocessor::Lex(clang::Token&) + 68
11 swift 0x000000010ed542b7 clang::Preprocessor::ReadMacroName(clang::Token&, clang::MacroUse, bool*) + 55
12 swift 0x000000010ed57630 clang::Preprocessor::HandleIfdefDirective(clang::Token&, bool, bool) + 48
13 swift 0x000000010ed564f4 clang::Preprocessor::HandleDirective(clang::Token&) + 1124
14 swift 0x000000010ed32966 clang::Lexer::LexTokenInternal(clang::Token&, bool) + 10182
15 swift 0x000000010ed834c4 clang::Preprocessor::Lex(clang::Token&) + 68
16 swift 0x000000010e6698bf clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 287
17 swift 0x000000010e5eb875 clang::ParseAST(clang::Sema&, bool, bool) + 501
18 swift 0x000000010e43eb72 clang::FrontendAction::Execute() + 66
19 swift 0x000000010e40af43 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 979
20 swift 0x000000010fb9e98d llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 269
21 swift 0x000000010fb9ead0 RunSafelyOnThread_Dispatch(void*) + 48
22 swift 0x000000010fbfbaed ExecuteOnThread_Dispatch(void*) + 13
23 libsystem_pthread.dylib 0x00007fff8ea2a9b1 _pthread_body + 131
24 libsystem_pthread.dylib 0x00007fff8ea2a92e _pthread_body + 0
25 libsystem_pthread.dylib 0x00007fff8ea28385 thread_start + 13
Stack dump:
0. /usr/include/sqlite3.h:76:2: current parser token 'ifndef'
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
swift-build: exit(1): ["/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swift-build-tool", "-v", "-f", "/Users/mbuhot/source/app/.build/debug/app.o/llbuild.yaml"]
```
Sqlite version info from the header is:
``` java
#define SQLITE_VERSION "3.8.10.2"
#define SQLITE_VERSION_NUMBER 3008010
#define SQLITE_SOURCE_ID "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4"
```
···
On Tue, Mar 22, 2016, at 11:29 AM, Jeremy Pereira via swift-users wrote:
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
jeremyp
(Jeremy Pereira)
March 23, 2016, 10:06am
3
Yes, in fact I tried it only a few minutes after posting my message (and it worked) but I was waiting for my post to appear in my inbox before replying to say I had found the work around, which it never did. My mailbox filter must be wrong.
It’s a bit disappointing that this crash has been around for three months and not been fixed. Maybe it would be a good project for my first contribution to the Swift Open Source effort.
···
On 22 Mar 2016, at 20:40, Ryan Lovelett via swift-users <swift-users@swift.org> wrote:
On Tue, Mar 22, 2016, at 11:29 AM, Jeremy Pereira via swift-users wrote:
So I installed Xcode 7.3 and now I see this segmentation fault
[SR-89] Segfault importing sqlite3.h from system module · Issue #63626 · apple/swift · GitHub
Does anybody know of a work around?
It looks like a work-around was posted on the thread. Have you tried
that?
[SR-89] Segfault importing sqlite3.h from system module · Issue #63626 · apple/swift · GitHub
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users