From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 7F0E93858C2D for ; Wed, 4 Jan 2023 13:26:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F0E93858C2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102d.google.com with SMTP id o8-20020a17090a9f8800b00223de0364beso38918454pjp.4 for ; Wed, 04 Jan 2023 05:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=lpvYlE1Wu3sK9+5c0ZNefM6ZR/sNzQkI/gDZ5kRrKas=; b=K1WEyExg6XhVvgUi9uj2eBWv0CcVBJBCV8o2mb669yjQ8Xf9WyvancigniCmoUAu/Q RtXkIbEkLcZmmIY8b6ewBXFgMgYDrVIPNSQ7Sh1J3eT3Gj4ILiD2GgNEbEZ/rkkxkzm/ VSKnrMgAiMFsHR8SUZKPCxLLcgZbQ51ZbWJVUzOwg/lmqNcZQ1AGpIR7c/aj9SBu05MP JSzbnfvBF57eOUQY8PwlGCURIbO5eshm5MPkYXsP+GapcyOm/udMUpe42yqbGW4e+LLR 3xOTFmRr3AfQW0Yz4nqJ8qxzGOhrd7oJVrq6KcKOuHD4xPoz9t3KcU2pvYAcB6McXObc H1rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lpvYlE1Wu3sK9+5c0ZNefM6ZR/sNzQkI/gDZ5kRrKas=; b=w/km5lipLc4q3Uc6eJNS2BHn/amjMi8Pfq1nAIzw+EaDJGG1zlHjALYQamETVSRoHo DmkEsq6mWBEDxW3VKWOujf5yBiMrYhVN/7LmKhlzdT5JIrYagVyFD3Zj6jSR6GvK26Ml nf4PUGYVx7ZLWCR414XKZ4b4xKkPOzfiL2xpvfKOpdPir/h1SB5UC9d36kMBSVlg5gE+ DnRYEGESGhiBlvUjlUgKUUSr5doC0UzN2fazWlnEPuiggBT1f3F2wjhzriipmqWjNYHn R2UToyORgGFXb3DQ6/4gg8s0IOrFH2wL2ZTSuxCkUEVdNQBxuu6POG90Wo66x7JiJU5j OCmw== X-Gm-Message-State: AFqh2kqAVEp7aeJAKxI7oadmYWaak6Aj5RR+/ipDG7imoOS5hwvGhx0W cvdrVzOa03d+0+zEwvoNTzqx9cJHnAQ= X-Google-Smtp-Source: AMrXdXt4BKotDOwnEd1R77L3VyAHGaLmYmGTVx8nfRoral+0hsRQ7kdZSw8ssN1uzRtrZbD093l7ag== X-Received: by 2002:a05:6a20:3942:b0:a5:7700:2a4a with SMTP id r2-20020a056a20394200b000a577002a4amr79767729pzg.51.1672838790316; Wed, 04 Jan 2023 05:26:30 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:934:e2e8:56f6:280a]) by smtp.gmail.com with ESMTPSA id i68-20020a626d47000000b0056b4c5dde61sm23034318pfc.98.2023.01.04.05.26.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 05:26:29 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id BB5EB1142D30; Wed, 4 Jan 2023 23:56:27 +1030 (ACDT) Date: Wed, 4 Jan 2023 23:56:27 +1030 From: Alan Modra To: binutils@sourceware.org Subject: fuzzed file timeout Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3035.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: objcopy of archive, element containing an object with a fuzzed section size far exceeding the element size. copy_section detects this, but the temp file is laid out for the large section. It can take a long time to write terabytes of sparse file, a waste of time when it will be deleted. * objcopy.c (copy_archive): Don't write element contents after bad status result from copy_object. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index a6182b48b6c..4d888906e67 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -3686,7 +3686,8 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target, if (!ok_object) del = !copy_unknown_object (this_element, output_bfd); - if (!(ok_object && !del ? bfd_close : bfd_close_all_done) (output_bfd)) + if (!(ok_object && !del && !status + ? bfd_close : bfd_close_all_done) (output_bfd)) { bfd_nonfatal_message (output_name, NULL, NULL, NULL); /* Error in new object file. Don't change archive. */ -- Alan Modra Australia Development Lab, IBM