* Andreas Jaeger
Guido Berhoerster
writes: * Andreas Jaeger
[2011-08-18 09:17]: * The malloc hook implementation is marked deprecated and will be removed from the default implementation in the next version. The design never worked ever since the introduction of threads. Even programs which do not create threads themselves can use multiple threads created internally.
I don't expect any program breakage but if you notice some, tell me, please!
This broke zfs-fuse, to be more specific it broke the port of libumem that comes with it and I'm not sure I understand why the addition of an attribute causes malloc.c:456:8: error: conflicting type qualifiers for '__malloc_initialize_hook' /usr/include/malloc.h:170:38: note: previous declaration of '__malloc_initialize_hook' was here (for complete build logs see filesystems/zfs-fuse)
Code in question is here: http://gitweb.zfs-fuse.net/?p=official;a=blob;f=src/lib/libumem/malloc.c;h=7...
Any ideas on how to address this?
The header was changed with two changes: * Adding the deprecated attribute * Giving a real definition for __MALLOC_HOOK_VOLATILE
and thus I expect that the following will fix it: Replace: void (*__malloc_initialize_hook)(void) = umem_malloc_init_hook;
With: void (*volatile __malloc_initialize_hook)(void) = umem_malloc_init_hook;
Thanks, I overlooked the second change.
But note, the whole interface is deprecated, so for glibc 2.15 this needs to be rewritten,
This could become a problematic since libumem uses these hooks to divert malloc, I haven't looked yet whether this is actually relied on, I'd assume that the Solaris code makes direct use of umem_alloc()/umem_zalloc(). -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org