@Test
	public void testHostilePtrLoop() throws CancelledException, IOException, DWARFException {

		addCompUnit();

		// hack to make a forward reference to a DIE that hasn't been created yet.
		// This creates a hostile loop in the data type references.
		long fwdDIE = dwarfProg.getRelativeDIEOffset(1);
		DebugInfoEntry constDIE =
			new DIECreator(dwarfProg, DWARFTag.DW_TAG_const_type).addRef(DW_AT_type, fwdDIE)
					.create();
		DebugInfoEntry ptrDIE = addPtr(constDIE);

		importAllDataTypes();

		DataType constDT = dwarfDTM.getDataType(constDIE.getOffset(), null);
		DataType ptrDT = dwarfDTM.getDataType(ptrDIE.getOffset(), null);

		assertNotNull(constDT);
		assertEquals(dwarfDTM.getVoidType(), ((Pointer) ptrDT).getDataType());
	}
Tests that endless loops (impossible without manual editing or intentional creation of bad
data) does not cause endless loop when processing.

@throws CancelledException
@throws IOException
@throws DWARFException
Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/bin/format/dwarf/DWARFDataTypeImporterTest.java