Opened 6 years ago
Closed 6 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@… |
Description
Hi,
perror should print only the error message, when its input is an empty string. See https://pubs.opengroup.org/onlinepubs/9699919799/functions/perror.html.
Code:
#include <errno.h>
#include <stdio.h>
int main(void)
{
errno = 0;
perror("");
}
Issue:
$ divine exec perror.c compiling perror.c loading bitcode … DiOS … LART … RR … constants … done booting … done : Success a report was written to p.report
The ": " part should not be there and the enclosed patch fixes it.
Attachments (1)
Change History (2)
Changed 6 years ago by
| Attachment: | perror.patch added |
|---|
comment:1 Changed 6 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Patch accepted.