From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by sourceware.org (Postfix) with ESMTPS id E29A93858D20 for ; Sat, 25 Mar 2023 19:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E29A93858D20 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-ua1-x932.google.com with SMTP id x33so3677889uaf.12 for ; Sat, 25 Mar 2023 12:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679773737; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ksgIZuLTlWGrho/d8jwI1iIbi4frqLgssgiynZ9TTYM=; b=m6h5OgfTwwh3RDJxYR7sBgOE6ueUovBPuE+VWQtjMnnH81wdQisIjGnPftoJ9JzKbi gibTSU63VcGBdDDyB9fgSWx5TI+FuK7wVVZ0KwNHuHD+4Ou37SGT32yi02HWjI4lZS8r a1edX2c3L+/yE5fquOkc+FRE8KZbiCDjtcT4LK3ODPqBb3KGJCYnqa+n4HhvY9jB+CkV 6tI/P8AV31vj/KlB54bUBItuc9tRtqFSEWVpUt5LD+ggcDnqeH4it65e2upM/NOtrkN+ nsN5ELbS4Wu5QDX18g++vqDDhBR/xZahtFJ1eIHl8rn4enqyCyYdjuWcw7llIO2UARXA 5Gfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679773737; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ksgIZuLTlWGrho/d8jwI1iIbi4frqLgssgiynZ9TTYM=; b=WaagiegF1+SzVCWIGBoENMbP3LFxNwmgX2eFvRto5Mu7Z2Md4rbxTB9GPqmgh/U6Kx 0gk0xDhujbjg1pWbxy6uTFQTjqhfMf+NaUhhzLRdhX/tt6ih7TuGm7Uub7QXhA9YR0SD W9hAnadpZamKltRnJmXAwQj4+aS9m6spYV7xRxigxoE2qK8XWgkmHZpjBnNQPA7Qzh2Y JTlAy70BXJa2CS3Jp5fbfWRcmP8n3Ft3+xhrpWatm7m/ZqfgysiHnNLsLVHFSMX/pfW8 aRntOlnWhvEj0hwHYcXY0EUI9cN7G9t3sTg3/cprtcQOhDxXDS7evo4oh19qi5dmJcCv QbIw== X-Gm-Message-State: AAQBX9ebhN+xBD9I7oPRQzaxJql7KvDsjiV0yFRG1MK1jBb4pUQcijNE pehmcij0CtIyJCTvwk9O8mcwkpwM/VRRhGTlu+cdxA== X-Google-Smtp-Source: AKy350Y3kg7nTVV/fyQ2dMPMO7XbL8hrZODoFdVzEGC4DQaQ/g6X4lxb7TtMtS7MbvpXSfDb4D74kII7vuh5KYOUThI= X-Received: by 2002:a1f:6ec4:0:b0:436:32fd:1ab with SMTP id j187-20020a1f6ec4000000b0043632fd01abmr2924365vkc.2.1679773737035; Sat, 25 Mar 2023 12:48:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Pluzhnikov Date: Sat, 25 Mar 2023 12:48:30 -0700 Message-ID: Subject: Re: Side effect inside assert macro? To: Andreas Schwab Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-18.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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: On Thu, Mar 23, 2023 at 5:54=E2=80=AFAM Andreas Schwab via Libc-alpha wrote: > > In elf/dl-open.c there are two calls to _dl_debug_update inside the > assert macro: > > 581: assert (_dl_debug_update (args->nsid)->r_state =3D=3D RT_CONSIS= TENT); > 930: assert (_dl_debug_update (args.nsid)->r_state =3D=3D RT_CONSISTENT)= ; > > Is it possible that these are the first calls of _dl_debug_update for > this nsid? Regardless of whether it's possible or not, this seems like a really bad idea(TM). Given that a fix is trivial, why not just fix it? I'll send a patch. --=20 Paul Pluzhnikov