From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OcWwN+G4Y2omvysAWB0awg (envelope-from ) for ; Fri, 24 Jul 2026 15:11:29 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=I6DnveZ+; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D0C8B1E033; Fri, 24 Jul 2026 15:11:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,WEIRD_PORT autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9E90C1E033 for ; Fri, 24 Jul 2026 15:11:28 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF6874BA2E1F for ; Fri, 24 Jul 2026 19:11:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF6874BA2E1F Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=I6DnveZ+ Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 5C2194BA2E08 for ; Fri, 24 Jul 2026 19:11:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C2194BA2E08 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C2194BA2E08 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784920262; cv=none; b=oUk6JiXiJf2qCP+bO1ByfP5AR8n2+bd2jWNkGFJek1ANfCeG87rqu31f0a8AEwV1hfxGZp9FkrPKTzXn+cs7lDCbjsD9sy0gEQY9QGAv0WSIojuHgINwT7GycZ2UuaqP4kJORgrYBAhomj2e8YrqhVHduh2MMdo12frHUWSWKTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784920262; c=relaxed/simple; bh=/KvOIxJtHHjW62VyjKUdUUQZtFcn22XhccUQ9vuEMqo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=rRCb926LeLlc+mPW0cwffxI/NIBVSxlUqCEMu8u8VCvQFh+zDnIwlx7MKV1uNG/Cb+IlIFRGJL6fOq0ttXYh4cTLCKTtmxbvrpsUSB2ohcjdjLYD25pSgK+ggo+KLIRf17Mv0QzrdxFNBk3+a8JOhqd+pLnEthIY0Q6B5D4QGr4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=I6DnveZ+ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C2194BA2E08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784920262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sLwXTTc+VT9O1uYAtbIzObY45AmwXwGxqc7ezwLLYI0=; b=I6DnveZ+G+J6qr7nSwtlGitGY9VrrRpywZjEVSWxcY43g4SBNsZJKCz8/+OlmXc9zUm0QR 93LUghZw/B31bFiqjQLr12WUF/lmIIT5bKWCUHde9Xxl9y0pEuSEzt1RSBvs51YfeNk/eT N4jYkSbMdA5CLvuKR/tMhJUnQ9qK6qo= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-464-0bqAy9ccPn6AoOGssaVRzg-1; Fri, 24 Jul 2026 15:11:00 -0400 X-MC-Unique: 0bqAy9ccPn6AoOGssaVRzg-1 X-Mimecast-MFC-AGG-ID: 0bqAy9ccPn6AoOGssaVRzg_1784920260 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2ce7dff6253so17570595ad.1 for ; Fri, 24 Jul 2026 12:11:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784920259; x=1785525059; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=sLwXTTc+VT9O1uYAtbIzObY45AmwXwGxqc7ezwLLYI0=; b=de/ekjrjWSCbq4gaZMXqnOBlsJ1cR7US6NKShVEsUgJFr/vj9cb1wJKiHUaDG66Wlc cdU5cU+JUgCt5byigxFYWWO0mCSkn9NUL6pZLkx11KNFCz6pB6M9+fuk6pklcRVilrsu niOqle/bDnfrQvMwjVgcV/1moSDK0TR/IFtpFG6SWbTbGEtxGlVPfl3/lr3bROnoNFnz +zaIaYYo0xC6juQbPsYQnu8xLWHKhyq7eXyFwXQgrzXCkynySQmktJ0MkbFaQACHOlEl Haf1NK613Lcr037BHVvCuNB320W2GeXxxj0yeVNOy/AWxga53mEFt5KHt4FBmukofiGo bbFg== X-Forwarded-Encrypted: i=1; AHgh+RqJ3mEHsc5gYi1jUuUNfDbZd/azIZYm6WTxWR6AM42rcXQVnrdFAEgcdHOhSAFLou952DGHjFxYh7eGGA==@sourceware.org X-Gm-Message-State: AOJu0YxeKQ7M49/R9PfWGNaxvYWThHu18qwP1wdu6bNMXCQf+0s72hoJ H82N9TwYRLmot3RaKmpEcrvVfXwJSUBzDkXTEkCCECjeFrgzS/h3GqMX5vRYQDFf2sqDkXIFTcB dthX2/HBrbptNuw7dTRpIE4a4c5mxiJiya4ANMf4JimMAWH+mwLdpqx+weGg3SHqXRBlHiTY= X-Gm-Gg: AR+sD11hwTL7b/RRdhLwxh38CHgQC3ZaKWSrE4rhU5cAzruCOrqgJxvAhdOlw3aTHjt EBBNUSEh0kZtngTSJpNwGQU2S16xW4SxbfgPg3PBgG/381cROJCamhEzikNpSVk5OefIyvgb1/w Vagco2HtSnGS45aV36G98WWIS1tFlDD0P+Fr4BGSiV7hGu9d5zha/YlTr07RfL1IGgSiAEt/7Sm yZ6EP6ajUk1mNoICY1DhkPDamWjFuu/KhWXa5nQ6bUYB9efoRFk1jRYKSSs8aAVUBAgT1BAXal/ RXOWCPqf65fcCviGnO645OtZY6HNZhbI3Bc7HPqFpjRBL2jI3c8aHGgR6Oxb9sly3PsrhKlo8cY iGgv1pNM= X-Received: by 2002:a17:902:e545:b0:2ce:b43e:44da with SMTP id d9443c01a7336-2cfd79a4401mr14047325ad.17.1784920259571; Fri, 24 Jul 2026 12:10:59 -0700 (PDT) X-Received: by 2002:a17:902:e545:b0:2ce:b43e:44da with SMTP id d9443c01a7336-2cfd79a4401mr14047115ad.17.1784920259166; Fri, 24 Jul 2026 12:10:59 -0700 (PDT) Received: from [150.1.200.157] ([172.56.105.224]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cf8efde5cfsm56583485ad.31.2026.07.24.12.10.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Jul 2026 12:10:58 -0700 (PDT) Message-ID: <053e90c0-53f0-4748-9d27-0237b9f21221@redhat.com> Date: Fri, 24 Jul 2026 12:10:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 08/17] gdb: convert type instance flags to bitfields To: Tankut Baris Aktemur , gdb-patches@sourceware.org References: <20260722-users-aktemur-type-instance-flags-v2-0-d60dcbc2a76f@amd.com> <20260722-users-aktemur-type-instance-flags-v2-8-d60dcbc2a76f@amd.com> From: Keith Seitz In-Reply-To: <20260722-users-aktemur-type-instance-flags-v2-8-d60dcbc2a76f@amd.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 885Opd5PA5zwOnLiJpwj-nj8wnG4kitnbAyOglFVuD0_1784920260 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hi, I know Tom has already approved this, but I want to raise awareness of a small problem introduced in this patch. On 7/22/26 3:41 AM, Tankut Baris Aktemur wrote: > diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h > index 1749c3ba741..11a08428baf 100644 > --- a/gdb/gdbtypes.h > +++ b/gdb/gdbtypes.h > @@ -99,51 +99,80 @@ enum harvard_address_space [snip] > > -/* Not textual. By default, GDB treats all single byte integers as > - characters (or elements of strings) unless this flag is set. */ > + type_instance_flags &operator|= (const type_instance_flags &other) > + { > + is_const = is_const || other.is_const; > + is_volatile = is_volatile || other.is_volatile; > + > + gdb_assert (harvard_aspace == 0); > + harvard_aspace = other.harvard_aspace; > This assumes the left-hand side is empty, but check_typedef can call |= when the accumulated (outer) flags already have a Harvard space or address class set. Here's a concrete demonstration of the problem: typedef int myint; (gdb) ptype (@code myint) 3 ../../src/gdb/gdbtypes.h:127: internal-error: operator|=: Assertion `harvard_aspace == 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ----- Backtrace ----- 0x5bb1d1 gdb_internal_backtrace_1 ../../src/gdb/bt-utils.c:122 0x5bb210 _Z22gdb_internal_backtracev ../../src/gdb/bt-utils.c:173 0xdfbbaa internal_vproblem ../../src/gdb/utils.c:434 0xdfbf45 _Z15internal_verrorPKciS0_P13__va_list_tag ../../src/gdb/utils.c:514 0x162763f _Z18internal_error_locPKciS0_z ../../src/gdbsupport/errors.cc:57 0x87e8e6 _ZN19type_instance_flagsoRERKS_ ../../src/gdb/gdbtypes.h:127 0x875d71 _Z13check_typedefP4type ../../src/gdb/gdbtypes.c:3072 [snip] The "outer" type (associated with "@code") has an address space set. When check_typedef then attempts to merge the inner "myint" definition, the assert triggers. Keith