Title: Consider adding `-Werror=unguarded-availability-new` to compiler flags for Apple platforms · Issue #100384 · python/cpython · GitHub
Open Graph Title: Consider adding `-Werror=unguarded-availability-new` to compiler flags for Apple platforms · Issue #100384 · python/cpython
X Title: Consider adding `-Werror=unguarded-availability-new` to compiler flags for Apple platforms · Issue #100384 · python/cpython
Description: Feature or enhancement Runtime crashes like #97897 could be prevented by turning clang's unguaded-availability-new warning into a fatal compile error. This can be done by adding -Werror=unguarded-availability-new to compiler flags. Essen...
Open Graph Description: Feature or enhancement Runtime crashes like #97897 could be prevented by turning clang's unguaded-availability-new warning into a fatal compile error. This can be done by adding -Werror=unguarded-a...
X Description: Feature or enhancement Runtime crashes like #97897 could be prevented by turning clang's unguaded-availability-new warning into a fatal compile error. This can be done by adding -Werror=unguard...
Opengraph URL: https://github.com/python/cpython/issues/100384
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider adding `-Werror=unguarded-availability-new` to compiler flags for Apple platforms","articleBody":"# Feature or enhancement\r\n\r\nRuntime crashes like #97897 could be prevented by turning clang's `unguaded-availability-new` warning into a fatal compile error. This can be done by adding `-Werror=unguarded-availability-new` to compiler flags.\r\n\r\nEssentially what this warning does is cross reference undefined symbols against symbols defined in the targeted Apple SDK. If it sees a symbol introduced in a newer SDK version and that symbol isn't weakly referenced/linked, you get a warning. `-Werror` upconverts it to a fatal compiler error.\r\n\r\nIf you add this flag to release builds, the compiler prevents you from shipping binaries that ship unguarded symbol usage for targeted SDK versions. i.e. it prevents run-time crashes when binaries run on older Apple OS versions.\r\n\r\nIf you enable this setting today, you may find the 3.8 branch isn't properly gating use of `mkfifoat` and `mknodat`. (Although this may be an oddity from python-build-standalone and not a CPython bug.) \r\n\r\ncc @ned-deily \r\n\r\n---\r\n\r\nThe advantages of having this additional warning is to catch regressions such as:\r\n\r\n- https://github.com/python/cpython/issues/123797\r\n- https://github.com/python/cpython/issues/75782\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128155\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/indygreg","@type":"Person","name":"indygreg"},"datePublished":"2022-12-21T02:12:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/100384/cpython/issues/100384"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ccd236b0-c764-1d3e-d7c4-2ee601391cec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC58:1C78:5AD5D:7997D:6A52D3E4 |
| html-safe-nonce | f16f803dd17b264f9e20271efd3c73100045707a4d27f2c169c85a939c2fb79a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzU4OjFDNzg6NUFENUQ6Nzk5N0Q6NkE1MkQzRTQiLCJ2aXNpdG9yX2lkIjoiNzM4OTM0Mjk1NTEwMDg4NTk4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2b197638fc81abb416cce20ba7b5babfa56e1bfe721bb5612a40bffbe93d0e73 |
| hovercard-subject-tag | issue:1505600187 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/100384/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8b151196ad056f3b2a85325f718ec2a2a4f5e25d8182ab2e3c178a7eb7b31ea1/python/cpython/issues/100384 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8b151196ad056f3b2a85325f718ec2a2a4f5e25d8182ab2e3c178a7eb7b31ea1/python/cpython/issues/100384 |
| og:image:alt | Feature or enhancement Runtime crashes like #97897 could be prevented by turning clang's unguaded-availability-new warning into a fatal compile error. This can be done by adding -Werror=unguarded-a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | indygreg |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width