You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift build --static-swift-stdlib
Building for debugging...
/usr/lib/swift_static/linux/libFoundationEssentials.a(Data+Writing.swift.o):_ThreadLocal.swift.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n:(.text+0x2122): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(Data+Writing.swift.o):_ThreadLocal.swift.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n:(.text+0x21b8): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(Data+Writing.swift.o):_ThreadLocal.swift.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n:(.text+0x21f5): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(Data+Writing.swift.o):_ThreadLocal.swift.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n:(.text+0x2286): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(Data+Writing.swift.o):_ThreadLocal.swift.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n:(.text+0x22f1): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
The text was updated successfully, but these errors were encountered:
There is an explanation in the source of why this doesn't work for us:
// The warning diligently tells us we shouldn't be using mktemp() because blindly opening the returned path opens us up to a TOCTOU race. However, in this case, we're being careful by doing O_CREAT|O_EXCL and repeating, just like the implementation of mkstemp.
// Furthermore, we can't compatibly switch to mkstemp() until we have the ability to set fchmod correctly, which requires the ability to query the current umask, which we don't have. (22033100)
Using
swift:latest
docker image I see this warning still. However, it seems like it should have been addressed back in Dec of 2020: #2927I'm using the docker image created by this Dockerfile: https://github.com/swiftlang/swift-docker/blob/01bc0e265e8dca6381d801b76762ada6836afb69/6.0/ubuntu/24.04/Dockerfile
The text was updated successfully, but these errors were encountered: