Share

MusE - Linux Music Editor

Tracker: Bugs

5 1.0rc3 malloc problem w/glibc-2.10 on x86_64 (with fix) - ID: 2819312
Last Update: Settings changed ( spamatica )

Running muse 0.9 or 1.0rc3 on x86_64 with glibc 2.10.1 triggers this memory
allocation error:

$ muse
muse: malloc.c:3074: 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 & pagemask) == 0)'
failed.
Aborted

Running with MALLOC_CHECK_=1 solves the problem showing errors about
free().

I compiled with debug symbols and running under gdb to locate the error. I
created a simple patch, that solves the problem, but maybe can be wrong
(please check it), just add +2 bytes in 'esize' Pool::grow @ memory.cpp

Take care.


Gerardo Exequiel Pozzi ( djgera ) - 2009-07-09 23:10

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 2 )

Date: 2009-07-15 21:12
Sender: spamaticaProject Admin

Right, the fix is probably not optimal. I'm going to add it with clear
comments as to it's origins.



Date: 2009-07-14 20:07
Sender: ogetbilo

I confirm the error. This stops muse staritng with glibc-2.10 on x86_64.
glibc-2.9, on the other hand, doesn't have this problem.

With the attached patch, muse starts with glibc-2.10 on x86_64. But I am
not sure either if it is a correct fix.


Attached File ( 1 )

Filename Description Download
muse-glibc210.patch Possible patch. Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-08-12 20:48 spamatica
resolution_id None 2009-08-12 20:48 spamatica
allow_comments 1 2009-08-12 20:48 spamatica
close_date - 2009-08-12 20:48 spamatica
File Added 334351: muse-glibc210.patch 2009-07-09 23:10 djgera