From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id 940B6389783D for ; Mon, 18 May 2020 21:11:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 940B6389783D Received: by mail-lj1-x22b.google.com with SMTP id u6so11413241ljl.6 for ; Mon, 18 May 2020 14:11:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5nrD0sI0YFcD6E7/hlEzQ42DdZWXapL/r3pyvWdVLzI=; b=XvL6oTLQuL2JebtfOq6Gon/GfJ8Sa3FCWR8DNlhCDhOj8fTbIOCZO1zZ3T+CymkDQf G0WSSoyfGpW+79vhzhm/7d+rpt+fYyHLoAM8/2Td8c1iV3sWucUPyk687m/h8YCd6nTL ZcUSsfiVr3755vTmSW/S2CFIo/Ko6X0KY8XDUwJ5QNU7EC66MqrOVYJbEkmb/W3EYyOt gitHDvg7R+w46HpPpK71eYC7KoxnGhdxFQCgVZLaYPJnyeYd3PxAxHKC37shb00Tw/QA KeXWQySLBSEaTDYd8q5fO8DRm29UKlOgUB6foksjK6nK1TCkIJQIaMddUmEEIu2k/Ope vEdw== X-Gm-Message-State: AOAM531+ab9O7Lvv2fFNKA4GsWNDaJoEJISmV/BEBzxvpE6vPYOOJVcW DeC786EivgNaxf9YJG5jcKGLmRh36iUlvTTeS0DdIgvB X-Google-Smtp-Source: ABdhPJwFtUZGWAchWib4q8urPsHx7AQYnRx7cuK7W8wWWprC4Q2aCAtYwn03l/uzGgMXxR06gO2fxftozvLAayQlIOU= X-Received: by 2002:a2e:9e4f:: with SMTP id g15mr12056639ljk.78.1589836281225; Mon, 18 May 2020 14:11:21 -0700 (PDT) MIME-Version: 1.0 References: <072e4b2b-4d71-b343-c8ef-0edbc6ab6804@simark.ca> <59eeb6ee-1ab2-e5aa-000a-2fb6d522b8d0@simark.ca> In-Reply-To: From: mlimber Date: Mon, 18 May 2020 17:11:09 -0400 Message-ID: Subject: Re: [PATCH] [PR 25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text To: Simon Marchi Cc: gdb-patches@sourceware.org X-Spam-Status: No, score=-2.4 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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Mon, 18 May 2020 21:11:33 -0000 On Mon, May 18, 2020 at 2:01 PM Simon Marchi wrote: > On 2020-05-15 2:33 p.m., mlimber wrote: > > Hrm. I've tried a number of smaller programs to repro this, including > the steps in the comments using the attachment or building my own, X11, > OpenGL, libicu tests, and also sample Qt apps that link `libicudata.so`. > Alas, I cannot recreate it in small-ish form. > > > > I've tried various combinations of these on Ubuntu 14.04 x64 building > with gcc 4.9 and also Ubuntu 20.04 x64 with gcc 9.3. > > > > I can reliably repro it with my full-scale Qt app, but I can't submit > that. When I debug gdb itself, I see where it is going awry in my app -- > with libicudata.so.52, which is a weird data-only library. > > Could you please tell us where this particular libicudata.so.52 comes > from? I'd like to compare > it with other libicudata.so files to understand what's so special about > this one. > > Simon > I built libicudata.so.52.2 from source (no customizations; just needed the particular version my version of Qt was looking for, and I modified the RPATH of the three ICU .so's to look in $ORIGIN for their dependencies since I distribute my app with its dependencies). Note that someone else also reported the libicudata.so being the culprit and that I have not yet triggered the error with the libicudata.so in a smaller program. The build steps for the offending .so right out of the build log for the library is: ``` gcc -D_REENTRANT -DU_HAVE_ELF_H=3D1 -DU_HAVE_ATOMIC=3D1 -DU_ATTRIBUTE_DEPRECATED=3D -O2 -std=3Dc99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -c -I../common -I../common -DPIC -fPIC -o ./out/tmp/icudt52l_dat.o ./out/tmp/icudt52l_dat.= s gcc -O2 -std=3Dc99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -static-libstdc++ -shared -Wl,-Bsymbolic -nodefaultlibs -nostdlib -o ../lib/libicudata.so.52.2 ./out/tmp/icudt52l_dat.o -Wl,-soname -Wl,libicudata.so.52 -Wl,-Bsymbolic ``` The assembly file is generated at build-time and is of the form: ``` .globl icudt52_dat .section .note.GNU-stack,"",%progbits .section .rodata .balign 16 .type icudt52_dat,%object icudt52_dat: .long 0x27DA0080,0x14,0x020000,0x446E6D43,1,3,0x706F4320,0x67697279,0x28207468,0x= 32202943,0x2C333130,0x746E4920,0x616E7265,0x6E6F6974,0x42206C61,0x6E697375,= 0x20737365,0x6863614D,0x73656E69,0x726F4320,0x61726F70,0x6E6F6974,0x646E612= 0,0x68746F20,0x2E737265,0x6C6C4120,0x67695220,0x20737468,0x65736552,0x64657= 672,0x202E,0 .long 0x0C64,0x6324,0x018370,0x6334,0x01B900,0x6347,0x01B9A0,0x635A,0x01BA00,0x63= 6B,0x01C580,0x637F,0x01C5E0,0x638F,0x01CF90,0x63A2,0x01CFF0,0x63B2,0x020420= ,0x63C5,0x020480,0x63D5,0x026160,0x63E9,0x0261C0,0x63FC,0x026220,0x640F,0x0= 26280,0x6422,0x0262E0,0x6435 [snip lots more data] ``` I can make the binary of the .so available to you if desired (it is 23 MB). M