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:
parent
1028ce923e
commit
7d4d667891
1 changed files with 2 additions and 1 deletions
3
umem.c
3
umem.c
|
@ -3328,7 +3328,8 @@ fail:
|
|||
return (0);
|
||||
}
|
||||
|
||||
void __attribute__((constructor))
|
||||
void
|
||||
__attribute__((section(".init")))
|
||||
__umem_init (void)
|
||||
{
|
||||
umem_startup(NULL, 0, 0, NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue