From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by sourceware.org (Postfix) with ESMTPS id A889B3857825 for ; Sat, 21 May 2022 07:12:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A889B3857825 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-f18e6ff0f6so12589483fac.11 for ; Sat, 21 May 2022 00:12:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RA9N1WWxXAM0lXzgI6Caug+kQgP+soy0uhChC3aCYI4=; b=BgOpqwgcTtSig4HwhcfwggIukxqmB/TSL7nTDuNrJbzwwcPo1uWo3+Bqo0+ZFL7AWw KDMes58hH+Q4RfdJYpCm9skCNnWyVBmfx+tJtz4Xz7b7OBfkXZS91upX/KfJ0eVWOyht 06oFbTAAUJ3n3pbPkCgHHCFmjdB/cqX83of/A7BzDKcN6ApF0XS4q0G3fpbTHcn7/Wk5 oDZoItuSIbudhND7iiIN8tvDsg5QAxyDIUQg+nvTs4E4NMeXbWikgt3+geqC85u2ddDK fLl6oXZJ9C9B17u13Ax2b73sj7keC8ouvG+l/iNQ6qqq68c8QBcruh452Yq/JM/IWe7b +mYA== X-Gm-Message-State: AOAM53311zQtTLcTxrvzI6vpj9MLkMEKIEcfa/xJit9m6zyvxsAznzPB 3GrO4uSKta23rYOjL1lracvA+EdYvam6r5XlZpg= X-Google-Smtp-Source: ABdhPJzKJ4pdj6s1GJHjuYDShB4mzm11UKl0kOqlOi3Fm1c2fWUMGK7wAxaDK2alTX+te4Ujm+/gANAgcTwCjZvzAXw= X-Received: by 2002:a05:6870:e245:b0:de:9321:9ea3 with SMTP id d5-20020a056870e24500b000de93219ea3mr7512987oac.79.1653117170503; Sat, 21 May 2022 00:12:50 -0700 (PDT) MIME-Version: 1.0 References: <87r14pyf1x.fsf@oldenburg.str.redhat.com> In-Reply-To: From: Zopolis0 Date: Sat, 21 May 2022 17:12:39 +1000 Message-ID: Subject: Re: Segfault in libjava/prims.cc while compiling gcj To: Florian Weimer Cc: Zopolis0 via Gcc-help X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2022 07:12:53 -0000 Running with make -k reveals that all the errors are segfaults, and all of them are on return new or throw new statements. One such error is on the return new FileOutputStream (ch); line in natVMChannels.cc: FileOutputStream* VMChannels::newOutputStream(FileChannelImpl* ch) { // Needs to be native to bypass Java access protection. return new FileOutputStream (ch); } Given that this does not seem like the kind of code to generate a segfault, I think there is a different issue here. On Thu, May 19, 2022 at 10:22 PM Zopolis0 wrote: > It's the same implementation from when it was removed, unless you mean > code outside of gcc/java and libjava, which in that case I could have made > an error copying it in or modernising it. > > On Thu, May 19, 2022 at 8:47 PM Florian Weimer wrote: > >> * Zopolis: >> >> > ../../../../gcj/libjava/prims.cc:182:23: internal compiler error: >> > Segmentation fault >> > 182 | = new java::lang::NullPointerException; >> > | ^~~~~~~~~~~~~~~~~~~~ >> >> This is likely a bug in the CNI implementation, specific to your GCJ >> port. Allocation of CNI classes is different from regular C++ classes. >> >> Thanks, >> Florian >> >>