From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id A0EE93858D28 for ; Fri, 4 Feb 2022 14:27:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0EE93858D28 Received: by mail-lf1-x129.google.com with SMTP id n8so13014809lfq.4 for ; Fri, 04 Feb 2022 06:27:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=I3EC6FF/HE+zj1PdD3HxnHcJ7zKm4Ymx91pXR/Snyoo=; b=UNNajpcN9qbkwd8+mc4kIMU9yQ5MeDaNwIpHmgfY/cK6epO8ai4EhFgdAHlelHCAsR VNOrNkTKmxW86JVVhFHg8Axwfg8BJeWwNUmJzPnmiRUk3Am5fIskkcqPUwlu9BQoWqgC oa16zIvL6/+opgUFVFrhVXWUStqTQ5DMF2F4+2sd7NJcG2ohVOzt7gvCx1pe8IdTq9wi P7QvWrCi31xA+UvZYaqYw0GkbdqyC6o7g5k33OBH1Pcly7ArW9oc4RGX704Jrp6fKkFt xPB1uIU3+GmbqoHpdYhZzp7BjKZw6G5MoNzJVoUHWlBJdLrWCL0QeVydjSqd94v4mIQd 0DPw== X-Gm-Message-State: AOAM530jYL8B8PYK0BAoQ+7xHQicEL+nMeINFwBoKabRLG2LZcBjSA2b hwOwt3R86LMIq6ypZ/xZl7k= X-Google-Smtp-Source: ABdhPJwGVq1zwQfundzQVEoUwLDmFf/1A0WkNUXZw1ka2f9DnJLRdHVAPRM4QIDxuLVI2iYgvtXI3A== X-Received: by 2002:a05:6512:3184:: with SMTP id i4mr2430586lfe.275.1643984836381; Fri, 04 Feb 2022 06:27:16 -0800 (PST) Received: from [192.168.10.175] (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id v29sm295456ljv.72.2022.02.04.06.27.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Feb 2022 06:27:15 -0800 (PST) Message-ID: Date: Fri, 4 Feb 2022 15:27:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Debugging ld.so in gdb Content-Language: en-US To: Florian Weimer Cc: Jacob Kroon via Gdb References: <29e0ef71-4706-9b0f-2a68-e12c54120d8e@gmail.com> <8735kypwcd.fsf@oldenburg.str.redhat.com> <87y22qognw.fsf@oldenburg.str.redhat.com> From: Jacob Kroon In-Reply-To: <87y22qognw.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2022 14:27:19 -0000 On 2/4/22 15:22, Florian Weimer wrote: > * Jacob Kroon: > >> This is what I get, following the instructions above: >> >>> 171966 0x00007ffff7fd85a0 : mov 0x0(%r13),%rax >>> 171967 0x00007ffff7fd85a4 : lea -0x8(%rax),%rdx >>> 171968 0x00007ffff7fd85a8 : mov %rdx,0x0(%r13) >>> 171969 0x00007ffff7fd85ac : mov %rbp,-0x8(%rax) >>> 171970 0x00007ffff7fd85b0 : add $0x8,%rsp >>> 171971 0x00007ffff7fd85b4 : pop %rbx >>> 171972 0x00007ffff7fd85b5 : pop %rbp >>> 171973 0x00007ffff7fd85b6 : pop %r12 >>> 171974 0x00007ffff7fd85b8 : pop %r13 >>> 171975 0x00007ffff7fd85ba : ret >> >> Does that make sense ? Any other information I can provide. This is with >> glibc-2.34-24.fc35.x86_64, Fedora 35. > > This doesn't really make sense. There's probably some GDB option to get > a longer trace. > > If it is crashing at the RET, it means that either code has been mapped > over, or the stack has been corrupted. At the crash site, what does > > print *(void**)$rsp > > print? > $2 = (void *) 0x7ffff7d31b70 > disassemble *(void**)$rsp > > could also be interesting. > "No function contains specified address" Let me see if I can find some gdb option to get a longer trace. Jacob