diff options
| author | John David Anglin <danglin@gcc.gnu.org> | 2026-02-10 09:41:43 -0500 |
|---|---|---|
| committer | John David Anglin <danglin@gcc.gnu.org> | 2026-02-10 09:41:43 -0500 |
| commit | 98dee6c96f5abc507966e0b8be2a37969b2bccfb (patch) | |
| tree | 2c44d025470746313e3c2cc931d3758dd0e80edc /Rules | |
| parent | 5f554e478c35801d7ddb32b68931c09e0ea3218b (diff) | |
| download | glibc-master.zip glibc-master.tar.gz glibc-master.tar.bz2 | |
Compiling gcc with -Werror=strict-aliasing exposed a type punning
issue in dl-fptr.c. It does a number of compare and swap operations
to atomically exchange function pointers, etc. The PTR argument
is dereferenced to determine the type of the objects to exchange.
Casting the type of the PTR argument to a different type will
result in in an error with -Werror=strict-aliasing. For example,
a `(ElfW(Addr) *' pointer is not strictly equivalent to a
`struct fdesc *' pointer.
Fix this by removing the casts from the COMPARE_AND_SWAP PTR
arguments and adjusting the type of the OLD and NEW arguments
to match the dereferenced PTR type.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Diffstat (limited to 'Rules')
0 files changed, 0 insertions, 0 deletions
