From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 6A0DB3858C3A for ; Thu, 4 Nov 2021 03:45:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6A0DB3858C3A Received: by mail-pf1-x42b.google.com with SMTP id s5so4554731pfg.2 for ; Wed, 03 Nov 2021 20:45:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=w4+qaZgBb4yrgEr2TAP4AqkGrh+RnDQBPeVb4zOzvqU=; b=pHrpKFor7p7DZWupPNcpkF8KBsTyQQd5x9n5viDFg6lRC3VzV44lHgADDylKB9Bgkq YklOZ8WbUmhz2+CcQScM/gF/ykC8DfIVxE0MXnD/1WTEi09+nCliap/LGjy+tOzqXh1R 4Up2sF/x2Sg5p/h9gTjvxHrjXTviIl9WiNzKCpeGL149UP1cL70XEhWxRRXie4nvMc7Z hQ54wBIkRF8d6CVodnoaxCe6GLjKblMP18y8lP0Ubbr+3pvv0WtOUJwhvPRDh+PKovHb 20Cenu5DmC44dSyX/ZOeAiDQWgPyzUIkSXWdPzM2zX14iox09BtH297UL7XhHIP7DGvW +cIQ== X-Gm-Message-State: AOAM530jSaQW0sWGjq9dr7ekX52RcHMNqtyX//utSzOL70riqiyNkmkZ I0iqjEvyzHHQl3PKWm9uMZmuev4U8qs= X-Google-Smtp-Source: ABdhPJwRIxycbkebjGhu/EvCgyfjncm4ZkS3gdWuqOwzloNLUh3ST/HDiqpYV942kdjNO7nybWJZmg== X-Received: by 2002:a63:6f0e:: with SMTP id k14mr37327488pgc.351.1635997553144; Wed, 03 Nov 2021 20:45:53 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:1cab:44e7:2b77:eb11]) by smtp.gmail.com with ESMTPSA id f20sm3654660pfc.220.2021.11.03.20.45.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 20:45:52 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id A9C37114216E; Thu, 4 Nov 2021 14:15:49 +1030 (ACDT) Date: Thu, 4 Nov 2021 14:15:49 +1030 From: Alan Modra To: binutils@sourceware.org Subject: PR28540, segmentation fault on NULL byte_get Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3037.0 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2021 03:45:55 -0000 It doesn't make much sense to go looking for separate debug info files on tekhex files.. PR 28540 * objdump.c (dump_bfd): Don't attempt load_separate_debug_files when byte_get is NULL. diff --git a/binutils/objdump.c b/binutils/objdump.c index 356e3ecd853..1bfb5c71e7a 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4862,7 +4862,7 @@ dump_bfd (bfd *abfd, bool is_mainfile) The test on is_mainfile is there because the chain of separate debug info files is a global variable shared by all invocations of dump_bfd. */ - if (is_mainfile) + if (byte_get != NULL && is_mainfile) { load_separate_debug_files (abfd, bfd_get_filename (abfd)); -- Alan Modra Australia Development Lab, IBM