malloc(): corrupted top size #1

Closed
opened 4 years ago by Ghost · 1 comments
Ghost commented 4 years ago

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 4 years ago
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 4 years ago
alema closed this issue 4 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: alema/hkd#1
Loading…
There is no content yet.