malloc(): corrupted top size #1

Closed
opened 2020-07-29 19:00:49 +02:00 by Ghost · 1 comment

Strange malloc bugs occur when parsing the config file.

I tried to find a minimal configuration that causes the malloc bugs I experienced: You need to have at least two lines that are not comments or blank and one line with a 26-character command to get this:

malloc.c:2379: sysmalloc: Assertion '(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

Try for example:

    * MUTE:
    * MUTE:
    * MUTE: abcdefghijklmnopqrstuvwxyz

If you give a command longer than 26 characters, you get this error:

malloc(): corrupted top size

Try for example:

    * MUTE:
    * MUTE:
    * MUTE: abcdefghijklmnopqrstuvwxyza
Strange `malloc` bugs occur when parsing the config file. I tried to find a minimal configuration that causes the `malloc` bugs I experienced: You need to have at least two lines that are not comments or blank and one line with a 26-character command to get this: malloc.c:2379: sysmalloc: Assertion '(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Try for example: ``` * MUTE: * MUTE: * MUTE: abcdefghijklmnopqrstuvwxyz ``` If you give a command longer than 26 characters, you get this error: malloc(): corrupted top size Try for example: ``` * MUTE: * MUTE: * MUTE: abcdefghijklmnopqrstuvwxyza ```
alema closed this issue 2020-07-29 22:03:52 +02:00
Owner

I'm not quite sure why the malloc bug occurs and valgrid didn't give me much useful information, but the parser should not allow for blank command or keys values.
I added a check for it and the problem should no longer occur.

I'm not quite sure why the malloc bug occurs and valgrid didn't give me much useful information, but the parser should not allow for blank command or keys values. I added a check for it and the problem should no longer occur.
alema reopened this issue 2020-07-29 22:07:00 +02:00
alema closed this issue 2020-07-29 22:07:03 +02:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: alema/hkd#1
No description provided.