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=-3.9 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 500531F4B5 for ; Tue, 12 Nov 2019 12:47:16 +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:date:from:to:subject:in-reply-to:references :reply-to:mime-version:content-transfer-encoding:content-type :message-id; q=dns; s=default; b=hvf9+4RQzMWY/aQHJj86tqUagHTwSk0 /CAYmnBEECu/zcMh2ugtG8ABunTc1lPLOxqGbG6f/DMRZjsI8vgfR/XGp9zZB7kx Uclra4rRRG+mVdQGp6+n2K0meg+pDeD68xBYd/azIkG9AHNxRzCdfuuJCImDx/m6 8MTwrOFtiIdo= 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:subject:in-reply-to:references :reply-to:mime-version:content-transfer-encoding:content-type :message-id; s=default; bh=78AZloPnumG4kHXvJwoYfGWj3a4=; b=xhzdt VZwKqUp4vtamk4p+3pDy+7Sq4s9wZwwU/TPzRgx5c/txOqbXEK1UeIDerWNEaaRa Eg1n67WcdAbXXB9pJmuX4xtikS3fgytdpLefhDaa7R4pfkuVHTt46Hgv+qXr+z74 QHt3gskq+Eu5sqSDZ3jAeSw5lgKZCtIe5wdQME= Received: (qmail 51912 invoked by alias); 12 Nov 2019 12:47:14 -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 51897 invoked by uid 89); 12 Nov 2019 12:47:14 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.osci.io X-Gerrit-PatchSet: 1 Date: Tue, 12 Nov 2019 07:47:09 -0500 From: "Gabriel F. T. Gomes (Code Review)" To: Florian Weimer , libc-alpha@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review] Clarify purpose of assert in _dl_lookup_symbol_x X-Gerrit-Change-Id: I3384349cef90cfd91862ebc34a4053f0c0a99404 X-Gerrit-Change-Number: 469 X-Gerrit-ChangeURL: X-Gerrit-Commit: 5a292b76a45ca8aa1e7c516a95b83bf4d593d9ab In-Reply-To: References: X-Gerrit-Comment-Date: Tue, 12 Nov 2019 07:47:09 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-76-gf8b6da0ab5 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191112124710.1C13F20AF6@gnutoolchain-gerrit.osci.io> Gabriel F. T. Gomes has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/469 ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Hi, Florian, This cleanup looks good to me. Thanks. Reviewed-by: Gabriel F. T. Gomes | --- elf/dl-lookup.c | +++ elf/dl-lookup.c | @@ -793,16 +793,14 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, | bump_num_relocations (); | | - /* No other flag than DL_LOOKUP_ADD_DEPENDENCY or DL_LOOKUP_GSCOPE_LOCK | - is allowed if we look up a versioned symbol. */ | - assert (version == NULL | - || (flags & ~(DL_LOOKUP_ADD_DEPENDENCY | DL_LOOKUP_GSCOPE_LOCK)) | - == 0); | + /* DL_LOOKUP_RETURN_NEWEST does not make sense for versioned | + lookups. */ | + assert (version == NULL || !(flags & DL_LOOKUP_RETURN_NEWEST)); PS1, Line 797: Checking for the incompatible flag makes more sense, imo, too. | | size_t i = 0; | if (__glibc_unlikely (skip_map != NULL)) | /* Search the relevant loaded objects for a definition. */ | while ((*scope)->r_list[i] != skip_map) | ++i; | | /* Search the relevant loaded objects for a definition. */ | for (size_t start = i; *scope != NULL; start = 0, ++scope) -- Gerrit-Project: glibc Gerrit-Branch: master Gerrit-Change-Id: I3384349cef90cfd91862ebc34a4053f0c0a99404 Gerrit-Change-Number: 469 Gerrit-PatchSet: 1 Gerrit-Owner: Florian Weimer Gerrit-Reviewer: Gabriel F. T. Gomes Gerrit-Comment-Date: Tue, 12 Nov 2019 12:47:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment