From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id BA942397202F for ; Thu, 14 May 2020 19:28:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BA942397202F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.193] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EBB9A1E79B; Thu, 14 May 2020 15:28:07 -0400 (EDT) Subject: Re: [PATCH] [PR 25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text To: mlimber Cc: gdb-patches@sourceware.org References: <072e4b2b-4d71-b343-c8ef-0edbc6ab6804@simark.ca> From: Simon Marchi Message-ID: <59eeb6ee-1ab2-e5aa-000a-2fb6d522b8d0@simark.ca> Date: Thu, 14 May 2020 15:28:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2020 19:28:19 -0000 On 2020-05-14 3:12 p.m., mlimber via Gdb-patches wrote: > Unfortunately, the simpler repro cases I have tried don't trigger the > failure, e.g., > > // main.c > extern int g_global_var; > int main() > { > return g_global_var; > } > > // libglobal.c > extern int g_global_var; > int g_global_var = 42; > > I build it like: > > gcc -shared -nostdlib -fPIC -o libglobal.so libglobal.c > gcc -o main main.c -lglobal -L. -Wl,--rpath,\$ORIGIN > > Running it in GDB works fine. Seems like something more is required. > > Even following the repro steps listed in the first comment or linking > against libicudata.so in a simple program like above work fine for me. > > My more complicated, real-world use case does consistently repro the bug > before the patch but does not after. > > More digging required. Suggestions welcome! > > M If you can make a reproducer that uses Qt, that's a good start. Then we can track down what's special about this use case, and try to make a reproducer that doesn't use it. But for the record, I was able to reproduce the crash using the instructions in the bug. Keith (comment 3) did too. Simon