[Mono-dev] Malloc issue?
gregoryyoung1 at gmail.com
Fri Aug 24 14:12:28 UTC 2012
Will take a look. Not sure what it may not be liking. Code is very basic.
Literally allocates 16mb chunk then frees it (each object has one) code
works fine in windows with same calls. Will debug it on Sunday.
On Friday, August 24, 2012, Jonathan Pryor wrote:
> > We are allocating and releasing unmanaged memory with
> marshal.allochglobal. In mono we are getting the following failure (no
> failures under clr).
> > Any ideas?
> That's not a mono error, that's a glibc assert (and thus cannot become an
> exception, ever):
> > part from team city logs:
> > [20:55:52][Step 2/2] mono: malloc.c:2451: 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.
> Very probably coming from:
> If not the first time through, we require old_size to be
> at least MINSIZE and to have prev_inuse set.
> assert((old_top == initial_top(av) && old_size == 0) ||
> ((unsigned long) (old_size) >= MINSIZE &&
> prev_inuse(old_top) &&
> ((unsigned long)old_end & pagemask) == 0));
> The line number is different, but it's the same file and the assert looks
> close enough (considering macro expansion, etc.).
> In short, malloc(3) doesn't like you or something that you're doing. I
> would suggest setting the MALLOC_CHECK_ environment variable (see the
> malloc(3) man page), and/or "porting" your malloc use to C to verify that
> it also crashes there.
> - Jon
Le doute n'est pas une condition agréable, mais la certitude est absurde.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list