arcana-lab / memoir

A case for representing data collections and objects in the LLVM IR
MIT License
12 stars 2 forks source link

Printing Struct Doesn't Terminate #21

Closed peteryongzhong closed 2 years ago

peteryongzhong commented 2 years ago

The issue can be reproduced by commit 6493b053ad437ccf3ffd9f0b9a4b21bc93003459 and in reference to the test case test_recursive_type.

In the test case, if one tries to get the allocation summary of Object *myB = allocateStruct(bTy); where bTy is

Type *bTy = defineStructType("B",
                             2,
                             ReferenceType(StructType("A")),
                             ReferenceType(StructType("B")));

One can get that summary but printing out the type doesn't terminate, which seems to imply something a bit weird since the to string function just loops through the fields?