This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug time/23789] New: mktime does not set errno on failure
- From: "eggert at cs dot ucla.edu" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 18 Oct 2018 01:41:35 +0000
- Subject: [Bug time/23789] New: mktime does not set errno on failure
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=23789
Bug ID: 23789
Summary: mktime does not set errno on failure
Product: glibc
Version: 2.28
Status: NEW
Severity: normal
Priority: P2
Component: time
Assignee: unassigned at sourceware dot org
Reporter: eggert at cs dot ucla.edu
Target Milestone: ---
Created attachment 11343
--> https://sourceware.org/bugzilla/attachment.cgi?id=11343&action=edit
test program that fails on 32-bit glibc
A while ago, POSIX added a requirement to 'mktime' that it must set errno on
failure. Probably this was around 2001. However, glibc mktime never got updated
to set errno and this should be fixed. I'll attach a program to illustrate the
bug. Compile and run it with 'gcc -m32 mktime-test.c'. It should exit with
status 0, but exits with status 2 because mktime does not set errno when it
fails.
--
You are receiving this mail because:
You are on the CC list for the bug.