From patchwork Thu Jul 16 05:09:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 496562 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id D748C14028F for ; Thu, 16 Jul 2015 15:09:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=l4ahNFB8; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=iHPK 3KvV/A+72kjoKt8uwi6xjwjyHIgIHM4echF8zGixxDYdoog/l04FePg7Fpy7Okms 8y9+R4/pa9c4B1MbfeogitPQ5Z+jKaSed2iNkqH16lbC2WRhOYJuXhOqcpFpIljp HhK3RLlrHKQM/5SCAchnISqjoTzauyPUmLdDwAA= 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:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=8YPcXAEd0M oON52j7lC2OyYy8BM=; b=l4ahNFB8ZcJkopEIQym88ufuYMsOCELtpZneafO/Yx oovNaU9+yNMXIZTGMuq+fqwJntA3AZpa5+JpD590YM7xwatkx7T7pJSLsDjYbM8o xI81s7SRPvWvOmzRNIiV5XQPvZHtLsKVmdxhG2DJoeSZoj9/7veWYd6j6c7eZ5Qn c= Received: (qmail 82761 invoked by alias); 16 Jul 2015 05:09:46 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 82732 invoked by uid 89); 16 Jul 2015 05:09:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Thu, 16 Jul 2015 10:39:36 +0530 From: Siddhesh Poyarekar To: "Carlos O'Donell" Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Set NODELETE flag when opening already open objects with RTLD_NODELETE Message-ID: <20150716050936.GQ29227@spoyarek.pnq.redhat.com> References: <1436947597-3800-1-git-send-email-siddhesh@redhat.com> <55A73AAB.80400@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55A73AAB.80400@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) On Thu, Jul 16, 2015 at 01:01:31AM -0400, Carlos O'Donell wrote: > > + dlclose (h1); > > + dlclose (h2); > > How does the test verify the object was not unloaded? The *foo dereference will crash if the object was unloaded. I have added a comment that says this and pushed it as obvious. > Post v2? I already committed it! Siddhesh commit e591758b38a606f6197cfdd0f8382fa8397b5e77 Author: Siddhesh Poyarekar Date: Thu Jul 16 10:38:29 2015 +0530 Add comment to clarify how the test can fail diff --git a/ChangeLog b/ChangeLog index 665f5cc..34b3128 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-07-16 Siddhesh Poyarekar + * tst-nodelete-opened.c (do_test): Add comment to clarify how + the test can fail. + * stdlib/cxa_thread_atexit_impl.c: Whitespace fixup. [BZ #18676] diff --git a/elf/tst-nodelete-opened.c b/elf/tst-nodelete-opened.c index 43b00fa..501d005 100644 --- a/elf/tst-nodelete-opened.c +++ b/elf/tst-nodelete-opened.c @@ -58,6 +58,8 @@ do_test (void) return 1; } + /* This FOO dereference will crash with a segfault if the DSO was + unloaded. */ printf ("foo == %d\n", *foo); return 0;