From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1624) id 9EAC33858CDA; Sun, 26 Mar 2023 16:01:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EAC33858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679846493; bh=PrUd+h6DqJbUlyX1VVz4qnu0jnuLy4mFkZySRAjKLTQ=; h=From:To:Subject:Date:From; b=dCfs7RNRagKL575Vu6y9htpVJf9AqC3hOI8KEhxjSRWknJ0PWQzWqOi6T7YBaG30d yo8NVDKPtxZtGlcmQfBtjPL+QeUrbaq3jf7r6yE+a0b1YpebigqUHDLoeNjPkFzkZ8 QzS3xfSQf6sLLZlyi6y7kSTQ3yx3JIa/LwTxMmWM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Paul Pluzhnikov To: glibc-cvs@sourceware.org Subject: [glibc] Minor: don't call _dl_debug_update (which can have side effects) inside assert X-Act-Checkin: glibc X-Git-Author: Paul Pluzhnikov X-Git-Refname: refs/heads/master X-Git-Oldrev: db9b47e9f996bbdb831580ff7343542a017c80ee X-Git-Newrev: 1b5e65ef6a442fdccf88d43c3048f98292d85631 Message-Id: <20230326160133.9EAC33858CDA@sourceware.org> Date: Sun, 26 Mar 2023 16:01:33 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1b5e65ef6a442fdccf88d43c3048f98292d85631 commit 1b5e65ef6a442fdccf88d43c3048f98292d85631 Author: Paul Pluzhnikov Date: Sat Mar 25 21:27:01 2023 +0000 Minor: don't call _dl_debug_update (which can have side effects) inside assert Diff: --- elf/dl-open.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elf/dl-open.c b/elf/dl-open.c index 91a2d8a538..2d985e21d8 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -578,7 +578,9 @@ dl_open_worker_begin (void *a) if ((mode & RTLD_GLOBAL) && new->l_global == 0) add_to_global_update (new); - assert (_dl_debug_update (args->nsid)->r_state == RT_CONSISTENT); + const int r_state __attribute__ ((unused)) + = _dl_debug_update (args->nsid)->r_state; + assert (r_state == RT_CONSISTENT); return; } @@ -927,7 +929,9 @@ no more namespaces available for dlmopen()")); _dl_signal_exception (errcode, &exception, NULL); } - assert (_dl_debug_update (args.nsid)->r_state == RT_CONSISTENT); + const int r_state __attribute__ ((unused)) + = _dl_debug_update (args.nsid)->r_state; + assert (r_state == RT_CONSISTENT); /* Release the lock. */ __rtld_lock_unlock_recursive (GL(dl_load_lock));