magazine_chain_pop_head gslice.c 处的分段错误:539
magazine_chain_pop_head Segmentation fault at gslice.c:539
我发现了一个由调用 g_slice_alloc0(160) 引起的段错误;我可以调用 g_slice_alloc0(320)、g_slice_alloc0(128) 或除 160 以外的任何值,而不会使用 gdb 捕获段错误。
我什至启用了 G_SLICE=always-malloc 或 G_SLICE=debug-blocks,但程序行为没有改变。
为了确保问题不是双重释放,我什至忽略了释放内存进行测试。
(相关link:https://mail.gnome.org/archives/gtk-devel-list/2010-December/msg00065.html)
same answer as from the mailing list thread适用于此:
It's possible the slice allocator has bugs, but the more probable
reason for those crashes is memory corruption and double-frees in the
affected code. Each bug should be treated as separate ones until
root-caused.
没有看到你的代码,就无法找到其中的错误。您是否 运行 您的代码在 valgrind 下搜索其他内存损坏问题?
我发现了一个由调用 g_slice_alloc0(160) 引起的段错误;我可以调用 g_slice_alloc0(320)、g_slice_alloc0(128) 或除 160 以外的任何值,而不会使用 gdb 捕获段错误。
我什至启用了 G_SLICE=always-malloc 或 G_SLICE=debug-blocks,但程序行为没有改变。
为了确保问题不是双重释放,我什至忽略了释放内存进行测试。
(相关link:https://mail.gnome.org/archives/gtk-devel-list/2010-December/msg00065.html)
same answer as from the mailing list thread适用于此:
It's possible the slice allocator has bugs, but the more probable reason for those crashes is memory corruption and double-frees in the affected code. Each bug should be treated as separate ones until root-caused.
没有看到你的代码,就无法找到其中的错误。您是否 运行 您的代码在 valgrind 下搜索其他内存损坏问题?