diff options
| author | Frank Denis <124872+jedisct1@users.noreply.github.com> | 2023-06-25 11:24:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-25 11:24:54 +0200 |
| commit | e7f872c9c6063e3d4e4f9bf46e998204b72fa84a (patch) | |
| tree | b8859c4b3ab5fa6b455ddbae6559fa12efd173cb /lib/std/multi_array_list.zig | |
| parent | b11170294052585ae81b9946d770f860d163da8f (diff) | |
| download | zig-e7f872c9c6063e3d4e4f9bf46e998204b72fa84a.tar.gz zig-e7f872c9c6063e3d4e4f9bf46e998204b72fa84a.zip | |
wasi-libc: compile emmalloc.c without strict aliasing (#16157)
emmalloc.c does a fair amount of type punning in order to access
the size of memory regions and traverse them.
Unfortunately, that can lead to unwanted optimizations.
This simple test case currently triggers a memory fault:
int main(void) {
char * volatile p = malloc(1);
p = realloc(p, 12);
p = malloc(1);
printf("%p\n", p);
}
Work around this by adding "-fno-strict-aliasing" when compiling
that file.
Diffstat (limited to 'lib/std/multi_array_list.zig')
0 files changed, 0 insertions, 0 deletions
