From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id 75F613858C2C for ; Wed, 15 Jun 2022 07:51:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 75F613858C2C Received: by mail-oo1-xc2c.google.com with SMTP id f2-20020a4a8f42000000b0035e74942d42so2177691ool.13 for ; Wed, 15 Jun 2022 00:51:14 -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=QkYYURUqM9CAoLx0D+WEH8oURffU1p3IAttvzLmGwQ4=; b=7s8CYUJX3BlpPExmXroVWnjLVydSBk548c5RpKxJhOwWRlju36yxMr/EazfytdJH/e wbZ4vZm9YrsJ6LWIl4HBwe7mvf+K4f/EeYJADOp575+ZSJaSVYTOli4pA89/iMUjPMUy qN6WOylLsKuUogPGHFB5ukEdivqAFWP1XuzZIFZnLIjRQf/rIVWJ7If/bblUOxDd82nL 40WaNIFVo9CEy4iSL/XMINDaig9MdKkr/mNhNuTcf5efWDJp94JfDnFAs5pbozq/oMr2 6kZvv8KlwjLe/Mk9WkOJVN2Ic9fzp+JGP6sG1b2oo0p3tYdXeA6qE7q5bsiJqY5ooZ78 EY9A== X-Gm-Message-State: AOAM532AxG1mqSQFXKj/AOILENLrTEMnjjTjleEwf4CL2mXgHfOiWR8Z HZc/5ovfoC1VMFDI9Ag34Y/7XSGR4RCu/CztINM= X-Google-Smtp-Source: ABdhPJzFUvhxXCLhO6ZgzAOqb3e8rBnTgBmKKKThaecljHO8/WtJtQ9olzE7DfP259gT2vXIafhquGlSBBllE4Pu7z8= X-Received: by 2002:a4a:4f16:0:b0:41b:6f0e:4acc with SMTP id c22-20020a4a4f16000000b0041b6f0e4accmr3578803oob.33.1655279473641; Wed, 15 Jun 2022 00:51:13 -0700 (PDT) MIME-Version: 1.0 References: <87r14pyf1x.fsf@oldenburg.str.redhat.com> In-Reply-To: From: Zopolis0 Date: Wed, 15 Jun 2022 17:51:01 +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.7 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: Wed, 15 Jun 2022 07:51:16 -0000 Never mind, that was a coincidence. All of the errors are on lines calling java:: something, or calling _Jv_ something. On Sat, 21 May 2022 at 17:12, Zopolis0 wrote: > 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 >>> >>>