29 Nov 04:54
SegFault caused by Glice g_slice_alloc()
Chen Lei <lei.chen <at> windriver.com>
2008-11-29 03:54:45 GMT
2008-11-29 03:54:45 GMT
Hi, Guys I'v encountered a problem in glib 2.16.3. I have called _g_slice_thread_init_nomessage() through g_thread_init() and all initialization successful. But when I called g_slice_alloc() later I found the address of global variable allocator and sys_page_size changed. Because of that, the allocator_categorize() was called in g_slice_alloc() and allocator was initialized again but with the member magazine_mutex left to NULL. g_slice_alloc() will call thread_memory_magazine1_reload() in some circumstance. This will try to lock the magazine_mutex and will definitely lead to an "Segmentation Fault". Could anybody familiar with Gslice help me? Thanks! Lei
RSS Feed