From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7CA9E211B4 for ; Mon, 14 Jan 2019 13:38:23 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=JEMtq XXB2sXd0OTFqhefDAUvQuyNUhyOR9R74OOe5qu40q/+4ZodaxNzri1syMtzHfYtK np3YjPPvm8QtY4WOhdGYU1M+Hj4vf6IYrOw5tHaknhwOW3U8GV2cEY+LH33IVpM+ ughm+hwJArP+27JdTHcsH63kFh5qEPhuw6nS+Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=FrAv+ytGf5F UWtUAnMREqqqkEWc=; b=gPmTtWctFgjjBEt67x3Fsbxg9Caxa879sRt56Ct/4x+ pj5fCEpJ3m4+j8vTaA2XK1Mf1ZvXVcX05g6lJHXJVYyzPUgWidusIgy+n50KD1zS aEZN/epeuHkAwsX3TB6ZqzCfH2da00evX9opK38TKJb3YBGpOlE9artRMOCnElg4 = Received: (qmail 80753 invoked by alias); 14 Jan 2019 13:38:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 80742 invoked by uid 89); 14 Jan 2019 13:38:20 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: Jim Wilson Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] RISC-V: Fix elfutils testsuite unwind failures. References: <20190113234809.4818-1-jimw@sifive.com> Date: Mon, 14 Jan 2019 14:38:15 +0100 In-Reply-To: <20190113234809.4818-1-jimw@sifive.com> (Jim Wilson's message of "Sun, 13 Jan 2019 15:48:09 -0800") Message-ID: <87tvibbbqw.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * Jim Wilson: > -int > -main (void) > +static void * > +func (void *a) > { > /* Arrange for this test to be killed if _Unwind_Backtrace runs into an > endless loop. We cannot use the test driver because the complete > call chain needs to be compiled with -funwind-tables so that > - _Unwind_Backtrace is able to reach _start. */ > + _Unwind_Backtrace is able to reach the start routine. */ > alarm (DEFAULT_TIMEOUT); > _Unwind_Backtrace (callback, 0); > + return a; > +} > + > +int > +main (void) > +{ > +#if USE_PTHREADS > + pthread_t thr; > + int rc = pthread_create (&thr, NULL, &func, NULL); > + if (rc) > + error (1, rc, "pthread_create"); > + rc = pthread_join (thr, NULL); > + if (rc) > + error (1, rc, "pthread_join"); > +#else > + func (NULL); > +#endif Do you expect func to be inlined, to preserve the pattern of the original test? I wonder if it is preferable to have separate, new file for this. Thanks, Florian