Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbRxg-00GebH-6q for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2024 21:43:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sbRxe-0034jE-JL for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2024 21:43:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbRxe-0034j6-9T for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2024 21:43:18 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sbRxb-003RSg-AU for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2024 21:43:16 +0000 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-81fd9251d99so43989439f.0 for ; Tue, 06 Aug 2024 14:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722980594; x=1723585394; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=mSLB9NVz0VpXtV3aL3+zEAW3gSxXVfcs4BCZpNHce8I=; b=EpRAMv6+UAUUyzRstvJfc/Wol2mDbRD2E/t15tmAUFMKlvMkTTwE843w7GlvxNaRyV m6Be7ZsHj6qZfq/TvhjygPpPtIhS3JkNh12W9V45ONiUZVews3nx9op8eCy709Xlsm1G MKlmm2C5EbKe6EUqPEu+J+ZgCbOtbbuWgCiBpsVlDsHkbbfgjcDF9z/Jy6ZBdHKUfkQ8 JqLqOEUqgEf8yhOyh3CPOWfTURTI0pi7BUkrPUydJzET9SISqexmQpD4WWvGpcs5Drdi xm4FqQ29wIKDw2kaJOKHVZdgpZCzrfv5TUk/9ax/z4Db8bJ+xVoFkPfGedUyjcLP/i12 a/0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722980594; x=1723585394; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mSLB9NVz0VpXtV3aL3+zEAW3gSxXVfcs4BCZpNHce8I=; b=jxWf9uWs7T7UOEkK0L00TKh5wZ80uwD8Nj/ISuyWjJy9aRMHJB5j+/ftm1H+7il7Ke Q/yHAemMItzV9qacjVToJlmot3Op8WqDQG5Qk3PJFWm/wU7XNqY+EWao8AfIT6hOJvHi xVFdwFLVdLlh5uLmyTgTSFEIW6WA3HcaTJo/hiaOXgf7U2zNhJMbOaLxpdJNuSF5wl5o WokTOvTQ7BWlTr0AHwFzdEIgYAdXJzgbeiK8iQUECCeg/mBACNvo02Eb7VQ5O6VQwCu2 Mhqe/XzlkgqIMnVS3qj/nmEF7GTevKmVA5nHpxjoT6s5Jw/tnAaIYScuneRo3QMJnSq4 LhiQ== X-Forwarded-Encrypted: i=1; AJvYcCVqux6GDG0nXx5sbuSouuvvhguolP8VjvHbMYTnawkorNTdCaQ9Q+iwQhKSyA71NMSAA6ep3SELpjjbzkQkqLRJ6Xwxka/aKHyVRRFbfO9CSpHe X-Gm-Message-State: AOJu0YzIskkyxzA3BvgQCoXKOI7m4OeFd21699tOmpn/83yHsxmD9Hxy aa0/c5gkJR9BrCi4vdK+06v24oDLoOi4HdpoozheW431HsdWU5bO X-Google-Smtp-Source: AGHT+IHLdbwuOurwxcUJ1PMaT7G9RA/nTCmtECPv4z7B5oou5D1Sv9SXWHUkrbVl6y9171tBUF7sRg== X-Received: by 2002:a05:6602:601b:b0:804:1579:182c with SMTP id ca18e2360f4ac-81fd4361be6mr1610618139f.5.1722980594305; Tue, 06 Aug 2024 14:43:14 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4c8d6a2728bsm2427561173.103.2024.08.06.14.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 14:43:13 -0700 (PDT) Date: Tue, 6 Aug 2024 16:43:12 -0500 From: Nathan Bossart To: Matthew Kim Cc: Joseph Koshakow , jian he , Alexander Lakhin , Tom Lane , PostgreSQL Hackers , Andres Freund Subject: Re: Remove dependence on integer wrapping Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 24, 2024 at 05:49:41PM -0400, Matthew Kim wrote: > Hi, I´ve attached a patch that fixes the make_date overflow. I´ve upgraded > the patches accordingly to reflect Joseph´s committed fix. cfbot is unhappy with this one on Windows [0], and I think I see why. While the patch uses pg_mul_s32_overflow(), it doesn't check its return value, so we'll just proceed with a bogus value in the event of an overflow. Windows apparently doesn't have HAVE__BUILTIN_OP_OVERFLOW defined, so pg_mul_s32_overflow() sets the result to 0x5eed (24,301 in decimal), which is where I'm guessing the year -24300 in the ERROR is from. [0] https://api.cirrus-ci.com/v1/artifact/task/5872294914949120/testrun/build/testrun/regress/regress/regression.diffs -- nathan