I am trying to multiply two binary strings ( each of which can have different sizes) without converting them to integer in any step. You may find my code here. It does work many a times , but sometimes it gives me the following error :
a.out: malloc.c:2372: 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 (core dumped).
I searched for this error on stack overflow but have not been able to figure out the error in my code since the past three days.I know that my code is not the best(using strlen multiple times etc) but still please help me figure out the error in this code (even though the code is long!).