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
Error is reproducible when building on Linux by adding -D_FORTIFY_SOURCE=2 to the CFLAGS.
Additional Detail from JIRA
Votes
0
Component/s
libdispatch
Labels
Bug
Assignee
mroi (JIRA)
Priority
Medium
md5: 7b08875efa899b1d63183c32fe0bd5d5
Issue Description:
The Nix Packages collection on Linux routinely builds with the fortify option (-D_FORTIFY_SOURCE=2). Currently, libdispatch fails to build with the following error:
/home/michael/swift/src/swift-corelibs-libdispatch/src/queue.c:47:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
_dispatch_client_assert_fail(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/michael/swift/src/swift-corelibs-libdispatch/src/internal.h:1056:3: note: expanded from macro '_dispatch_client_assert_fail'
asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/sr4253np2gz2bpha4gn8gqlmiw604155-glibc-2.27-dev/include/bits/stdio2.h:199:3: note: expanded from macro 'asprintf'
__asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/michael/swift/src/swift-corelibs-libdispatch/src/queue.c:56:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
_dispatch_client_assert_fail(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/michael/swift/src/swift-corelibs-libdispatch/src/internal.h:1056:3: note: expanded from macro '_dispatch_client_assert_fail'
asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/sr4253np2gz2bpha4gn8gqlmiw604155-glibc-2.27-dev/include/bits/stdio2.h:199:3: note: expanded from macro 'asprintf'
__asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Since the fix is very easy, I was hoping it could be considered, even though _FORTIFY_SOURCE may not be the recommended way of building swift.
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
Error is reproducible when building on Linux by adding
-D_FORTIFY_SOURCE=2
to theCFLAGS
.Additional Detail from JIRA
md5: 7b08875efa899b1d63183c32fe0bd5d5
Issue Description:
The Nix Packages collection on Linux routinely builds with the fortify option (
-D_FORTIFY_SOURCE=2
). Currently, libdispatch fails to build with the following error:Since the fix is very easy, I was hoping it could be considered, even though
_FORTIFY_SOURCE
may not be the recommended way of building swift.The text was updated successfully, but these errors were encountered: