From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0822D3858C2B for ; Wed, 10 May 2023 01:18:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0822D3858C2B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683681534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RLXs77IVtu9f5maiDD0MRNKuD32VjpYWAORDwkwwv4Q=; b=FMEMNTQCTS37fho+ERw0Hr+nDSGgd+ykYqrKnDdWH/mT0L/YkRidX+XEjzuaqOMzg1W6s+ kfLHazJlrpXYvjYOVmKlPAdlRexGun5M/0hqEoLOphlRleoKJEBk7FIPWVs4/rwkQgBukp zt9XaDoXTntPOiz2UtiGW6eNFeK6Uv0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-12-wR1mtqWgM665G_GfWY29Zg-1; Tue, 09 May 2023 21:18:53 -0400 X-MC-Unique: wR1mtqWgM665G_GfWY29Zg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 05F7E2999B40; Wed, 10 May 2023 01:18:53 +0000 (UTC) Received: from redhat.com (unknown [10.22.18.152]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7A011120ABB; Wed, 10 May 2023 01:18:52 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.94.2) (envelope-from ) id 1pwYTk-0001ws-0X; Tue, 09 May 2023 21:18:52 -0400 Date: Tue, 9 May 2023 21:18:51 -0400 From: "Frank Ch. Eigler" To: Wei Wu Cc: elfutils-devel@sourceware.org Subject: Re: Segfault in dwfl_module_getsrc Message-ID: <20230510011851.GE24013@redhat.com> References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: Hi - > I tried to use elfutils to retrieve the backtrace within a signal handle, > but I am having a segfault inside `dwfl_module_getsrc`. > [...] A red flag is "within a signal handler". The kinds of code that one may safely invoke in a signal handler are highly limited. Most elfutils functions are not safe this way. See % man signal-safety - FChE