Opened 4 years ago

Closed 4 years ago

#112 closed defect (fixed)

libc: perror behaves incorrectly when its input is an empty string

Reported by: Lukáš Zaoral Owned by:
Priority: minor Milestone: 4.4
Component: DiOS Keywords:
Cc: kdudka@…, lzaoral@…


perror should print only the error message, when its input is an empty string. See


#include <errno.h>
#include <stdio.h>

int main(void)
    errno = 0;


$ divine exec perror.c
compiling perror.c
loading bitcode … DiOS … LART … RR … constants … done
booting … done
: Success
a report was written to

The ": " part should not be there and the enclosed patch fixes it.

Attachments (1)

perror.patch (387 bytes) - added by Lukáš Zaoral 4 years ago.

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by Lukáš Zaoral

Attachment: perror.patch added

comment:1 Changed 4 years ago by Henrich Lauko

Resolution: fixed
Status: newclosed

Patch accepted.

Note: See TracTickets for help on using tickets.