On 07/03/2018 05:22 AM, Felix Miata wrote:
I tried to follow the instructions at https://wiki.archlinux.org/index.php/Uniform_look_for_Qt_and_GTK_application... but get $SUBJECT instead of expected result:
# zypper se -s kgtk i+ | kde3-kgtk | package | 0.10.1-5.1 | x86_64 | KDE3 $ kgtk-wrapper gimp-2.8 %U gimp-2.8: malloc.c:2399: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. /opt/kde3/bin/kgtk2-wrapper: line 33: 31604 Aborted (core dumped) LD_PRELOAD=/opt/kde3/lib64/kgtk/libkgtk2.so:$LD_PRELOAD "$@"
I've noticed KDE3 bugs in B.O.O are not getting any respect lately. Should I file a bug anyway? Does anyone know a solution to this core dump?
Yes, File it. KDE3 is still supported to at least 42.3 EOL (and hopefully long thereafter) I sure wish Ilya or the current leader on 42.3 KDE3 would move it to github so we could all contribute to fixing the nits needed to get it running on 15.0. The current assertion failure is a testament to unreadable code :) You have ----- This Stuff ----- (old_top == (((mbinptr) (((char*) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || (--- or ----) ----- This Stuff ----- ( (unsigned long)(old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & (pagesize - 1)) == 0) This is hard to dissect without pulling a hopefully finding relevant comments but it looks like it is checking whether: the top of the stack (av)->bins[0] is equal to the old_top of the stack *and* that the old_size is zero (I'm guessing some stack_empty type check) OR The old_size >= (whatever is at malloc_chunk.fd_nextsize) is 8/16 byte-aligned *and* old_top is odd and is not page-aligned. Why the hell you would use '((1) - 1) * 2' as an index for (av)->bins[..] is beyond me. Depending on how it is done, and depending on the gcc version you are using (gcc >= 8 has the 16-byte alignment requirement), there was a new requirement that the stack (the function stack, (not the (av)->bins[...] stack) be 16-byte aligned on function return. My guess is the code above is not generating code that is properly aligned on function return (which is guaranteed to cause a SegFault) Here is one Question, assembly related, but discusses the issue more broadly: https://stackoverflow.com/questions/51070716/scanf-throws-segmentation-fault... -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-kde3+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde3+owner@opensuse.org