(you don't have to strictly follow this form)

**Describe the bug**
The following query leads to OOM if server was built with thread sanitizer.

```sql
SELECT range(65535) FROM system.one ARRAY JOIN range(65536) AS number

if (remove_low_cardinality || (client_revision && client_revision < DBMS_MIN_REVISION_WITH_LOW_CARDINALITY_TYPE))
        {
            column.column = recursiveRemoveLowCardinality(column.column);
            column.type = recursiveRemoveLowCardinality(column.type);
        }
        
        writeStringBinary(column.name, ostr);
        
        String type_name = column.type->getName();
        
        
        if (client_revision < DBMS_MIN_REVISION_WITH_TIME_ZONE_PARAMETER_IN_DATETIME_DATA_TYPE
            && startsWith(type_name, "DateTime("))
            type_name = "DateTime";
        writeStringBinary(type_name, ostr);
        
        if (rows)    
            writeData(*column.type, column.column, ostr, 0, 0);
        if (index_ostr)
        {
            writeStringBinary(column.name, *index_ostr);
            writeStringBinary(column.type->getName(), *index_ostr);
            writeBinary(mark.offset_in_compressed_file, *index_ostr);
            writeBinary(mark.offset_in_decompressed_block, *index_ostr);
        }
    }
}
}