Commit Graph

5 Commits

Author SHA1 Message Date
Saleem Abdulrasool
0174528f81 stdlib: fix the problem swept under the rug in 58a97f1603
The `-Winvalid-offsetof` warning is valid in this case. `offsetof` is
being applied to types with a non-standard layout. The layout of this
type is undefined by the specification. There is no guarantee that the
type layout is uniform across all ABIs. It is not possible to portably
compute the offset statically, especially efficiently.

Sink this check into a unit test to avoid performing this test at
runtime. In order to do this in the standard library, we would need to
do this check through a global constructor.
2025-02-03 09:25:06 -08:00
Allan Shortlidge
4799f1e295 Concurrency: Suppress some warnings. 2025-02-01 13:52:43 -08:00
Kuba Mracek
db94dc7d36 [Concurrency] Fix memory leak around mismatched refcounting in Concurrency 2024-10-31 21:43:02 -07:00
Alex Lorenz
f72ea6526f [stdlib][android] ignore the -Wgnu-offsetof-extensions in ExecutorChecks.cpp
ExecutorChecks.cpp no longer builds for android as -Wgnu -Werror is used for stdlib
2024-10-02 17:31:37 -07:00
Alastair Houghton
837513dc16 [Concurrency] Fix test failures, add struct layout checks.
We were missing a field in `SwiftJob`, which broke various things.  To
avoid that problem in future, this PR adds a set of static asserts to
check the layout of various structures and that we're using the same
values as well.

Also added some functions to the ABI, and fixed things so that if you
enable the debug logging the library still builds (there was an extra
`_` in `Actor.cpp` that caused a build failure).

Finally, renamed `Hooks.cpp` to `ConcurrencyHooks.cpp`.

rdar://135380149
2024-09-30 17:16:33 +01:00