fix strict aliasing problems
The (main) issue here is that char *
is not allowed to alias
with anyType *
. With gcc-10 in Fedora this now started
to cause real problems and loading stats module segfaulted.
Actually I can't see in standard (C11 6.5 par.7) that using void *
is guaranteed to be correct, but at least it seems fine with gcc,
and e.g. some standard functions like posix_memalign() use it
in the same "dangerous" way.
EDIT: further commit deals with aliasing risks due to libuv.
Merge request reports
Activity
added bug label
For reference,
stats
module in Fedora 32 currently crashes on load because of this.TODO
-
consider defaulting to
-fno-strict-aliasing
anyway because of libuv, especially if we see no measurable performance impact. Refs:
Edited by Vladimír Čunát-
consider defaulting to
added 1 commit
- e2972723 - lib/generic/array: fix a strict aliasing problem
added 1 commit
- cad90154 - meson.build: compile with -fno-strict-aliasing
mentioned in commit a03568f9
mentioned in issue #552 (closed)