[swift-dev] Memory leak in SourceKitService since using Swift name lookup tables by default

Pascal Urban mail at pscl.de
Sun Jan 17 08:33:09 CST 2016


Hi all,
so there is currently a massive memory leak in SourceKitService when using the latest snapshot of Swift (since 22.12.15).

After some git bisecting I narrowed the introduction of the memory leak down to the following commits:
"Clang importer: enable the Swift name lookup tables by default."
https://github.com/apple/swift/commit/ae6b41dc3774bae08f5e1f066ab557e77cd0324e

"Clang importer: delete most of the old name lookup path. NFC"
https://github.com/apple/swift/commit/19894754d40e0777706909330e07808e466b261d

lnspecting SourceKitService in Activity Monitor shows lots of duplicate open files.

At this point I'm a bit out of my depth and don't know how to continue further.
I figured that the best next step would be to share my findings on the mailing list and open a new bug.
Hopefully someone more familiar with the code base can find the origin of the leak.

The bug report with more information can be found here:  https://bugs.swift.org/browse/SR-562

Pascal



More information about the swift-dev mailing list