diff options
author | wez <wez@1665872d-e22b-0410-9e5d-a57ad4215e6d> | 2010-06-26 23:00:02 +0000 |
---|---|---|
committer | wez <wez@1665872d-e22b-0410-9e5d-a57ad4215e6d> | 2010-06-26 23:00:02 +0000 |
commit | 39a56503b09a4a810b1ffce4bdf0fb6efc5fe08f (patch) | |
tree | 113f5d0702fea74e3e83658de038fbc664c062b7 | |
parent | b433a814549547e192301f6760721a5e3c782bc4 (diff) | |
download | portableumem-39a56503b09a4a810b1ffce4bdf0fb6efc5fe08f.tar.gz |
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.
git-svn-id: https://labs.omniti.com/portableumem/trunk@60 1665872d-e22b-0410-9e5d-a57ad4215e6d
-rw-r--r-- | umem.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3328,7 +3328,8 @@ fail: return (0); } -void __attribute__((constructor)) +void +__attribute__((section(".init"))) __umem_init (void) { umem_startup(NULL, 0, 0, NULL, NULL); |