Open
Description
I amended the library file libs/libc/stdlib.c2
this way:
// [...]
import string;
// [...]
#if 1
public fn void* malloc(c_size size) {
void *p = calloc(size, 1);
if (p) return string.memset(p, 0xff, size);
return p;
}
#else
fn void* malloc(c_size size);
#endif
Running some tests with this library patch makes the compiler hang on macOS with an infinite loop.
output/tester/tester -v test/template/function/opaque_template_arg_ok.c2t
I suspect this is caused by a missing initializer for a field in an object allocated from the heap (directly or indirectly).
Metadata
Metadata
Assignees
Labels
No labels