[applied] Bug 30467 - enlightenment fails self check on f38

Message ID 87jzwidunf.fsf@redhat.com
State New
Headers
Series [applied] Bug 30467 - enlightenment fails self check on f38 |

Commit Message

Dodji Seketeli June 5, 2023, 11:18 a.m. UTC
  Hello,

This is yet another instance of a latent canonical type propagation
issue.  Basically, when reading back a type from ABIXML,
canonicalizing it (in an order that is different from the initial
order in which it has been canonicalized by the DWARF front-end)
yields a different canonical type from the original one computed by
the DWARF front-end, yielding spurious self-comparison changes.

By looking at it a bit closer, I realized the cache of the comparison
results wasn't being cleared upon canceling canonical type
propagation, whenever that canceling occurs.  That leads to some
subsequent comparisons being wrong (albeit fast, heh) because they
rely on cached results that should have been invalidated.

This patch thus clears the type comparison result cache whenever
canonical type propagation canceling occurs.

	* src/abg-ir-priv.h (environment::priv::cancel_ct_propagation):
	Clear the type comparison results cache.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 src/abg-ir-priv.h | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h
index 0161017f..fe5a36cf 100644
--- a/src/abg-ir-priv.h
+++ b/src/abg-ir-priv.h
@@ -1053,6 +1053,7 @@  struct environment::priv
     // tentative canonical type that might be later canceled.
     t->priv_->set_does_not_depend_on_recursive_type();
     env.priv_->remove_from_types_with_non_confirmed_propagated_ct(t);
+    env.priv_->clear_type_comparison_results_cache();
   }
 
   /// Clear the propagated canonical type of a given type.