From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WHrOHZ80nWWTWgAAkFu2QA (envelope-from ) for ; Tue, 09 Jan 2024 12:57:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +MrqGp80nWUv1gAAqHPOHw (envelope-from ) for ; Tue, 09 Jan 2024 12:57:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=G1VtkgKA; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704801439; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=d387rZuxfvoRPe0EOfWnhhA7+8HyiDjpgdZTNK3QM2A=; b=gtj9Eb2tvuuy3bHqPQ1GOgi8QylSxipvOiZ55fjevVt8VJNDfzQANT/0Kn+CscD1cWhkMt HcNiH9rRWdPPr8EQt9zmVqcpA3oFf5eRoB5AH1XsMHwU8w9vOPDrXqszVMD/5o2EtpkxnW yrvCwSHIRwF0Zmw8aQQQBeWdCZY8JAYd28fRABqc4HsuHNkSsVqkab3+OJQPaSdY+DN+fs MVzcToRqBkgsnaxARaSjJBodO0gi8ishbu0LaUM51z9iF9uy/BvsN4fvjhxGX8XlUkIBfZ hTnO5/FOpHYnkxQoquas/DZ2DQYi9uueVuE5CVYAlL8iM1MuRV6dD4FxssaABg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=G1VtkgKA; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704801439; a=rsa-sha256; cv=none; b=I52CRHpRgw2hY//hB/BB1Q02mrqixND48TXI18ZyVQgi1E6QiIYYW4xTMk8Vc6IXas8l9h +3CA9DP72Gv1tksjPEUa2Mu0Ym7BqN6uxJKp/GbynSWEPLTYReMMhEz4fGoj0t7/GLQKsY 53w2kNKuiDVzHS9ieXf5ACMGZMkVqp+o161X7YW4I0vx4rr4EH1zj/gf+GLHehfNU6UznU w9GhD+tUJgYNECJ5W91ncjjzFvbi6SD0qqMJeM4YK+j5ZCHVEHb/IfqqEsYoLRp0LdZ7wt GMKk14r7Wi3mqwFEdntIrVpXd/DkJu069QKzSnXTOoq/R4Ii/cH19AlPGhYVDQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 11A6B160FF for ; Tue, 9 Jan 2024 12:57:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNAj3-0008Oc-OP; Tue, 09 Jan 2024 06:56:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNAj1-0008OE-Tm for bug-guix@gnu.org; Tue, 09 Jan 2024 06:56:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNAj1-0003Ns-KY for bug-guix@gnu.org; Tue, 09 Jan 2024 06:56:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNAj8-0005Dm-6F for bug-guix@gnu.org; Tue, 09 Jan 2024 06:57:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#68333: Time bomb in icedtea/openjdk References: <20240108000242.3312a1dc@lepiller.eu> In-Reply-To: <20240108000242.3312a1dc@lepiller.eu> Resent-From: Rostislav Svoboda Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 09 Jan 2024 11:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68333 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 68333@debbugs.gnu.org Received: via spool by 68333-submit@debbugs.gnu.org id=B68333.170480137620000 (code B ref 68333); Tue, 09 Jan 2024 11:57:02 +0000 Received: (at 68333) by debbugs.gnu.org; 9 Jan 2024 11:56:16 +0000 Received: from localhost ([127.0.0.1]:38531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNAiN-0005CV-Gz for submit@debbugs.gnu.org; Tue, 09 Jan 2024 06:56:15 -0500 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:59567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNAiH-0005C6-K4 for 68333@debbugs.gnu.org; Tue, 09 Jan 2024 06:56:14 -0500 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-429ad8984e3so478971cf.2 for <68333@debbugs.gnu.org>; Tue, 09 Jan 2024 03:56:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704801357; x=1705406157; darn=debbugs.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=d387rZuxfvoRPe0EOfWnhhA7+8HyiDjpgdZTNK3QM2A=; b=G1VtkgKA3X1d0atoV8TEbib+K1yOrTfHRmJzq3G8ZEJYDQE2suscpNKmkhq+y1Rhmu iwnGNKcdP9MLXw+hlOsHfXjYAoaTRhUf6GOBa7g47/3tgpRW8u5Tx2gqfX+9pnFSnJff mq6iTWQuLzGLYlV4GMCKIzv9LVoAZEEWe/wDCFVzhekGGnLNdXOGr+qkDftqFIu07p1P O3lFtOOziP4cEfxMRyfGn4IzDcbr1J1oDdj/U/0RpehTIK4Sx97C/BLxPFcjAJccC3tN w3rMn9MZ3InuDuycj1cXSbqX5PYgFLFTT4n4pCFnYBZsYKt/uTi/9aURZ+AYRpFxgAAe AhUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704801357; x=1705406157; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d387rZuxfvoRPe0EOfWnhhA7+8HyiDjpgdZTNK3QM2A=; b=lVEjanhgz7ZuyJecxq5c860/PFLeNm+a7SgGTF7umkAT7guk5LRpXjLXfVtwXSxVRR TMJWGgs2/5hslNUj4/LVZrSZ3Hyst57Cg8bjpzPXEO5Iteg+O6B6a78EwA/hBO2e92fM SAaJajMRsqThA96QQ7ioCc8Zh6qXoogePPXmJ5QBcC19RVqnikd2HxjYP6MQd/Jc/5vZ Glk+5Dwo5w99bkLoX1QNd4WsGCPFVFqtlcfg6hATezZSvqZCd+WH14vvyj/0wpYmVhDl F+909WuKKYhDLucsBNiZY3pPGHzLXTtL380IUOj2uJbG6PxBk1kwt8HvQW7dKVru3PQz eTBQ== X-Gm-Message-State: AOJu0YwilJWrO0pFpLybeNhV9EHHSZNdC33XgAnaZqUsTH1O27CIOx1l +DZMZhyCY65meaa3+iYpQo3AqCyvC7b6PvmTlA6OeJYaf2LeDA== X-Google-Smtp-Source: AGHT+IH5IYuNbj99G3d5bdlE+2SEWUvRDZIw49a9KqweQ6vHf4KXFskrPgVZgqQ3aSbiOPKtxDAqntIBVqAsYlMdoNw= X-Received: by 2002:ac8:594e:0:b0:429:a32a:9e9e with SMTP id 14-20020ac8594e000000b00429a32a9e9emr887563qtz.78.1704801356869; Tue, 09 Jan 2024 03:55:56 -0800 (PST) MIME-Version: 1.0 From: Rostislav Svoboda Date: Tue, 9 Jan 2024 12:55:20 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -3.69 X-Spam-Score: -3.69 X-Migadu-Queue-Id: 11A6B160FF X-TUID: ShZc24pLR+/F > I couldn=E2=80=99t find =E2=80=98GenerateCurrencyData.java=E2=80=99 thoug= h, not sure where it lives. bost@ecke /tmp/guix-build-icedtea-2.6.13.drv-0$ fd GenerateCurrencyData.jav= a icedtea-2.6.13/openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/= GenerateCurrencyData.java icedtea-2.6.13/openjdk-boot/jdk/make/tools/src/build/tools/generatecurrency= data/GenerateCurrencyData.java icedtea-2.6.13/openjdk.src/jdk/make/tools/src/build/tools/generatecurrencyd= ata/GenerateCurrencyData.java bost@ecke /tmp/guix-build-icedtea-2.6.13.drv-0$ fd GenerateCurrencyData.java | xargs sha1sum e819f2a934acca80a8eee42434459c70ad1bbf76 icedtea-2.6.13/openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/= GenerateCurrencyData.java e819f2a934acca80a8eee42434459c70ad1bbf76 icedtea-2.6.13/openjdk-boot/jdk/make/tools/src/build/tools/generatecurrency= data/GenerateCurrencyData.java e819f2a934acca80a8eee42434459c70ad1bbf76 icedtea-2.6.13/openjdk.src/jdk/make/tools/src/build/tools/generatecurrencyd= ata/GenerateCurrencyData.java bost@ecke /tmp/guix-build-icedtea-2.6.13.drv-0$ rg -N -B 30 -A 12 'time is more than 10 years from present' icedtea-2.6.13/openjdk.src/jdk/make/tools/src/build/tools/generatecurrencyd= ata/GenerateCurrencyData.java private static int makeSpecialCaseEntry(String currencyInfo) throws Exception { Integer oldEntry =3D specialCaseMap.get(currencyInfo); if (oldEntry !=3D null) { return oldEntry.intValue(); } if (specialCaseCount =3D=3D maxSpecialCases) { throw new RuntimeException("too many special cases"); } if (currencyInfo.length() =3D=3D 3) { checkCurrencyCode(currencyInfo); specialCaseCutOverTimes[specialCaseCount] =3D Long.MAX_VALUE; specialCaseOldCurrencies[specialCaseCount] =3D currencyInfo; specialCaseOldCurrenciesDefaultFractionDigits[specialCaseCount] =3D getDefaultFractionDigits(currencyInfo); specialCaseOldCurrenciesNumericCode[specialCaseCount] =3D getNumericCode(currencyInfo); specialCaseNewCurrencies[specialCaseCount] =3D null; specialCaseNewCurrenciesDefaultFractionDigits[specialCaseCount]= =3D 0; specialCaseNewCurrenciesNumericCode[specialCaseCount] =3D 0; } else { int length =3D currencyInfo.length(); if (currencyInfo.charAt(3) !=3D ';' || currencyInfo.charAt(length - 4) !=3D ';') { throw new RuntimeException("invalid currency info: " + currencyInfo); } String oldCurrency =3D currencyInfo.substring(0, 3); String newCurrency =3D currencyInfo.substring(length - 3, lengt= h); checkCurrencyCode(oldCurrency); checkCurrencyCode(newCurrency); String timeString =3D currencyInfo.substring(4, length - 4); long time =3D format.parse(timeString).getTime(); if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) { throw new RuntimeException("time is more than 10 years from present: " + time); } specialCaseCutOverTimes[specialCaseCount] =3D time; specialCaseOldCurrencies[specialCaseCount] =3D oldCurrency; specialCaseOldCurrenciesDefaultFractionDigits[specialCaseCount] =3D getDefaultFractionDigits(oldCurrency); specialCaseOldCurrenciesNumericCode[specialCaseCount] =3D getNumericCode(oldCurrency); specialCaseNewCurrencies[specialCaseCount] =3D newCurrency; specialCaseNewCurrenciesDefaultFractionDigits[specialCaseCount] =3D getDefaultFractionDigits(newCurrency); specialCaseNewCurrenciesNumericCode[specialCaseCount] =3D getNumericCode(newCurrency); } specialCaseMap.put(currencyInfo, new Integer(specialCaseCount)); return specialCaseCount++; }