private void populateStubUnion(DWARFDataType ddt, DIEAggregate diea)
			throws IOException, DWARFExpressionException {
		long unionSize = diea.getUnsignedLong(DW_AT_byte_size, -1);

		UnionDataType union = (UnionDataType) ddt.dataType;
		for (DebugInfoEntry childEntry : diea.getChildren(DW_TAG_member)) {
			DIEAggregate childDIEA = prog.getAggregate(childEntry);

			// skip static member vars as they do not have storage in the structure
			// C does not allow static member vars in unions
			if (childDIEA.hasAttribute(DW_AT_external)) {
				continue;
			}

			int bitSize = childDIEA.parseInt(DW_AT_bit_size, -1);
			boolean isBitField = bitSize != -1;

			String memberName = childDIEA.getName();
			if (memberName == null) {
				memberName = "field_" + union.getNumComponents();
			}

			DWARFDataType childDT = getDataType(childDIEA.getTypeRef(), null);
			if (childDT == null) {
				Msg.warn(this, "Bad union member data type for " + memberName + " in " +
					union.getDataTypePath() + "[DWARF DIE " + diea.getHexOffset() + "], skipping");
				continue;
			}

			DataType dt = fixupDataTypeInconsistencies(childDT);
			String memberComment = null;
			if (dt instanceof Dynamic ||
				dt instanceof FactoryDataType) {
				memberComment = "Unsupported dynamic size data type: " + dt;
				dt = Undefined.getUndefinedDataType(1);
			}
			int dtLen = dt.getLength();
			if (unionSize != -1 && !isBitField && dtLen > unionSize) {
				// if we can, ensure that the member being added to the union isn't larger
				// than what DWARF specifies.

				if (dtLen > 1) {
					// replace problematic datatype with 1 byte undefined placeholder
					memberComment =
						"Data type larger than union's declared size: " + dt;
					dt = Undefined.getUndefinedDataType(1);
				}
				else {
					// can't do any fancy replacement, just add warning to union's description
					DWARFUtil.appendDescription(union, memberDesc("Missing member",
						"data type larger than union", memberName, dt, -1, bitSize, -1), "\n");
					continue;
				}
			}

			if (isBitField) {
				if (!BitFieldDataType.isValidBaseDataType(dt)) {
					DWARFUtil.appendDescription(union,
						memberDesc("Missing member",
							"Bad data type for bitfield: " + dt.getName(), memberName,
							dt, -1, bitSize, -1),
						"\n");
					continue;
				}

				// DWARF has attributes (DWARFAttribute.DW_AT_data_bit_offset, DWARFAttribute.DW_AT_bit_offset)
				// that specify the bit_offset of the field in the union.  We don't use them.
				try {
					union.addBitField(dt, bitSize, memberName, memberComment);
				}
				catch (InvalidDataTypeException e) {
					Msg.error(this,
						"Unable to add member " + memberName + " to structure " +
							union.getDataTypePath() + "[DWARF DIE " + diea.getHexOffset() +
							"], skipping: " + e.getMessage());
					DWARFUtil.appendDescription(union, memberDesc("Missing member ",
						"Failed to add bitfield", memberName, dt, -1, bitSize, -1), "\n");
				}
			}
			else {
				// just a normal field
				try {
					DataTypeComponent dataTypeComponent =
						union.add(dt, memberName, memberComment);
					// adding a member to a composite can cause a clone() of the datatype instance, so
					// update the instance mapping to keep track of the new instance.
					updateMapping(dt, dataTypeComponent.getDataType());
				}
				catch (IllegalArgumentException exc) {
					Msg.error(this,
						"Bad union member " + memberName + " in " + union.getDataTypePath() +
							"[DWARF DIE " + diea.getHexOffset() + "] of type " + childDT +
							", skipping");
				}
			}
		}

		if (union.getLength() < unionSize) {
			// NOTE: this is likely due incorrect alignment for union or one or more of its components.
			// Default alignment is 1 for non-packed unions and structures.

			// if the Ghidra union data type is smaller than the DWARF union, pad it out
			DataType padding = Undefined.getUndefinedDataType((int) unionSize);
			try {
				union.add(padding, null,
					"Automatically generated padding to match DWARF declared size");
			}
			catch (IllegalArgumentException exc) {
				DWARFUtil.appendDescription(union,
					"Failed to add padding to union, size should be " + unionSize, "\n");
			}
		}
		if (unionSize > 0 && union.getLength() > unionSize) {
			DWARFUtil.appendDescription(union, "Imported union size (" + union.getLength() +
				") is larger than DWARF value (" + unionSize + ")", "\n");
		}
		if (importOptions.isTryPackStructs()) {
			DWARFUtil.packCompositeIfPossible((Composite) ddt.dataType, dataTypeManager);
		}
	}
Returns true if the DWARF struct is larger than Ghidra allows (ie. bigger than MAX_INT).

@param structSize long int size of the DWARF struct
@return true if bigger than Ghidra can handle
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFDataTypeImporter.java