Skip to content

Double-free with FilePath in Xcode 13 beta #53

@varungandhi-apple

Description

@varungandhi-apple

Originally reported as https://bugs.swift.org/browse/SR-14895 by @Frizlab.

FilePath crashes (double-free) with the following code

import Foundation
import System

if #available(macOS 12.0, *) {
	let relative = FilePath("Versions")
	_ = FilePath("/a/b/c").appending(relative.components)
	print(relative)
}

Demo repo: https://gitlab.com/frizlab-demo-projects/pathcrash

It does not crash when using SystemPackage version 0.0.2 instead of System (either in release or debug compilation mode).

Configuration: macOS 12.0 Beta (21A5268h) with Xcode 13.0 beta (13A5155e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions