From nobody Thu Mar 21 13:32:32 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V0mbh3NmKz5Dcf4 for ; Thu, 21 Mar 2024 13:32:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V0mbh11gCz4Tyq for ; Thu, 21 Mar 2024 13:32:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711027952; a=rsa-sha256; cv=none; b=R639AcQNr5zvxwDy5VDjGTe9ib2rpUbT7YCex8F0KAOcvX8NHnXvp48NnXv57CucpbFEds 48Nim/5UvXMAKWica4EshNeZDP+irKy/+rF4+FULnh+/vWb/k976eYAwBPKSQenPoTzmXa X2nB5jiTRXNfutIK9u6sZFzvxoTPUuVjK9sGfhA7KGuIhCpxFw/AlSikGVrHiwPU1wDJQE Uo8B4CkejAV0ew2TGv+/JUjtk0IggYerxLslLiX0+fx5J2a7JjwBLd0Z6QHquQy4W77Ovh XzAzB82w3aaHb809y+G6NDilxTRrczq8ZWooADHsGfTIjpC4xwtoDF6rVBvAcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711027952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vX6qQavqimyf/mlT244R5uy/A3cNknWJQS30D8UImB4=; b=qawaC8M2x8r/GSb84UOx24Jyqm/TKfLEQ4TbrUg0OLFzbbqOTKtB6xy3JY6mWYFAI/ndlu 8KtsUD62M5Xjrp0TcYk78TbQkb7HbTcLgqmmAq7iZ7VmqX/uObocE6eHwQKyeOqMmxR3Ss qIFhKj7jBpFhSJhIl64KJbmJDu0BsfSFxw5KmAxoOINFhG1gbpbXgV9FdzzJZwrgQPbpgv iGQ69StAygZ0DIizfPMwqV7lq8b8GSAFSWtywkC2RX6hnuZoF640V/diwNsCBv8SY6qEWo vfBZDuXtcDhGHi6vlsSnMkEmCr3olqu9OHg9aHZgJQRUxS7YYneimyIjriR5jA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V0mbh0ddNzdPP for ; Thu, 21 Mar 2024 13:32:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 42LDWWaI094671 for ; Thu, 21 Mar 2024 13:32:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 42LDWW5T094670 for bugs@FreeBSD.org; Thu, 21 Mar 2024 13:32:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 277863] Possible regression in mktime(3) Date: Thu, 21 Mar 2024 13:32:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: nsonack@outlook.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.mimetype attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277863 Bug ID: 277863 Summary: Possible regression in mktime(3) Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: nsonack@outlook.com Attachment #249371 text/plain mime type: Created attachment 249371 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D249371&action= =3Dedit Code that triggers the mktime bug The following works on FreeBSD 13.0-RELEASE amd64 but fails on 14.0-RELEASE amd64 (code included as an attachment): # # freebsd-version 13.0-RELEASE # # uname -m amd64 # # cat mktime_bug.c #include #include #include #include #include #include #include int main(void) { struct tm time_buf =3D { .tm_sec =3D 0, .tm_min =3D 0, .tm_hour =3D 0, .tm_mday =3D 1, .tm_mon =3D 0, .tm_year =3D 69, .tm_wday =3D 3, .tm_yday =3D 0, .tm_isdst =3D 0, .tm_zone =3D "CET", }; errno =3D 0; time_t const unix_time =3D mktime(&time_buf); if (errno) err(EX_DATAERR, "mktime failed"); printf("Unix time is: %ld\n", unix_time); return 0; } # # cc -g -O0 -o mktime_bug mktime_bug.c # ./mktime_bug Unix time is: -31539600 # Whereas on 14.0-RELEASE: $ freebsd-version 14.0-RELEASE-p5 $=20 $ uname -m amd64 $=20 $ cc -g -O0 -o mktime_bug mktime_bug.c $ ./mktime_bug mktime_bug: mktime failed: Value too large to be stored in data type $=20 Note that the requested year is 1969 - the bug is possibly related to this fact. This might be a regression due to a version bump of tzcode. This bug was discovered due to a test failure in schilytools at https://codeberg.org/schilytools/schilytools/issues/66. --=20 You are receiving this mail because: You are the assignee for the bug.=