From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 63B433858D1E for ; Thu, 7 Sep 2023 14:03:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63B433858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694095438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=644UvUoAqtehP3B1oINUbXxpeP5DDj7kfC6GMIVKzm0=; b=HJ5o3enCw29Xcd7sd18F9KmSPQlw+noB1Xqr+UM1P7N7u4rDeO/v8XEjwz8xAoF1yqf5tV Vq251L9gnK+x80esrFFd+MLRAoaiezFswK0dK/tPX+9125IDbGRGmlhlMmLwuiMnSv65rs cewLhkjeHwMFqh0yRQ32OG4ArvqrUYI= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-45-Ab-5M4JPNlOpdO8DCiPaKQ-1; Thu, 07 Sep 2023 10:03:57 -0400 X-MC-Unique: Ab-5M4JPNlOpdO8DCiPaKQ-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-649b66c99b7so11482846d6.2 for ; Thu, 07 Sep 2023 07:03:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694095436; x=1694700236; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=644UvUoAqtehP3B1oINUbXxpeP5DDj7kfC6GMIVKzm0=; b=Z57aAvi5NFiqLt1HeQkOmD8mT+TzWudjXkU5OlYRFdMUQe1ixJLDKv86orKciou5Xm o4f+j3Zhwk1q3L81wvhF3ri5IbjGNJnj0KSpdxzjjmeduaKgcyWD4dZCP/JoOG9idbKQ myG4FHtFdQ9DyKw0F2tdTGUAU+6S/GXWtmW7R/aJnYVIhN2/rX9O+RTE21+2vkjfFctI TkQBZVsO3kuq5jgC4F4We0h8VIHWYmiML2gdd6ZrExQDF15boyHp5J1jaUZA185DKh+2 HvEZosdypCKczWDj0waHhY6CmuJRRAMJKdplO6Py5JqJzJTC+EoZ6p5LFlOuD+EoWOQC 50vg== X-Gm-Message-State: AOJu0Yx/MSRhchnMRr368PVHLAdtXX6X1ty+tfcBsvuTYJhk7AcJViWD FLdluPwMkX7bIaDjDrUkJ8sc4x/uDOUUmdky763MeYd1KG2j+T+XusfamYbkN/YrnYc2WDLzszg mNcASPE/3sA6lpZlvnHdQyZXY9FGR X-Received: by 2002:a05:622a:196:b0:413:5f84:4246 with SMTP id s22-20020a05622a019600b004135f844246mr23735482qtw.10.1694095436439; Thu, 07 Sep 2023 07:03:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+rjcbWYNvnecVp3NY7NLOjOlLUZK1HAsRkQPXQDbqo/+gvwkBChnKpT+NvcRnQlh8r/NXBw== X-Received: by 2002:a05:622a:196:b0:413:5f84:4246 with SMTP id s22-20020a05622a019600b004135f844246mr23735417qtw.10.1694095435595; Thu, 07 Sep 2023 07:03:55 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id fp17-20020a05622a509100b0041087c90049sm6203246qtb.52.2023.09.07.07.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 07:03:54 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 43A92B4FD2; Thu, 7 Sep 2023 16:03:53 +0200 (CEST) From: Dodji Seketeli To: Dodji Seketeli Cc: libabigail@sourceware.org Subject: [PATCH 11/16] ir: Fix forgetting canonicalizing some function types Organization: Red Hat / France References: <87il8mglc1.fsf@redhat.com> X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Thu, 07 Sep 2023 16:03:53 +0200 In-Reply-To: <87il8mglc1.fsf@redhat.com> (Dodji Seketeli's message of "Thu, 07 Sep 2023 15:32:46 +0200") Message-ID: <875y4mf5bq.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP 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: Hello, It appears some function types are not canonicalized. Fixed thus. * src/abg-ir.cc (maybe_adjust_canonical_type): Once a missing member function has been copied from it's destination to the freshly canonicalized type, make sure the type of the member function is canonicalized as well. (copy_member_function): Bind the lifetime of the new function type to the lifetime of the current translation unit. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 93d79b33..2bbb1a49 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -15006,7 +15006,11 @@ maybe_adjust_canonical_type(const type_base_sptr& canonical, // class doesn't have that member function. Let's // copy that member function to the canonical class // then. - copy_member_function (canonical_class, *i); + { + method_decl_sptr method = + copy_member_function (canonical_class, *i); + canonicalize(method->get_type()); + } } } } @@ -22873,7 +22877,7 @@ copy_member_function(const class_or_union_sptr& t, const method_decl* method) old_type->get_is_const(), old_type->get_size_in_bits(), old_type->get_alignment_in_bits())); - keep_type_alive(new_type); + t->get_translation_unit()->bind_function_type_life_time(new_type); method_decl_sptr new_method(new method_decl(method->get_name(), -- 2.39.3 -- Dodji