Change the constructor attribute to putting this function in the

.init section.

The constructor is called too late, and clobbers state, leading
to heap corruption later.
This commit is contained in:
Wez Furlong 2010-06-26 23:00:02 +00:00
parent 1028ce923e
commit 7d4d667891

3
umem.c
View file

@ -3328,7 +3328,8 @@ fail:
return (0);
}
void __attribute__((constructor))
void
__attribute__((section(".init")))
__umem_init (void)
{
umem_startup(NULL, 0, 0, NULL, NULL);