GNOME Bugzilla – Bug 699137
g_list_append /g_slice_alloc yields segmentation fault
Last modified: 2013-11-24 01:35:25 UTC
I hope I filed this bug in the correct category, but Your 'components' don't make any sense to me. Your manual doesn't state which component GList is part of. Anyways... Using this snippet of code: void blah() { static int j = 0; printf( "call no. %i\n", ++ j ); GList* abc = NULL; for( int i = 0; i < 100; i ++ ) { printf( "---> step %i\n", i + 1 ); abc = g_list_append( abc, GINT_TO_POINTER( i ) ); } g_list_free( abc ); } int main() { while( 1 ) blah(); } causes a segementation fault in call no. 1 step 48. The debugger says, g_slice_alloc causes it. Version is from ubuntu repository.
Can't reproduce with either 2.32.4 from Debian nor with today's master; And Valgrind is happy too. Debian GNU/Linux x86-64.
I can't get this to crash on Ubuntu Raring. No crash on Fedora 18, either. Did you include the proper headers in the above code: <stdio.h> and <glib.h>? Is there anything else unusual about your system?
no information was provided