[applied] Don't use the "infinite" keyword for arrays of unknown size

Message ID 87r0wemaee.fsf@seketeli.org
State New
Headers
Series [applied] Don't use the "infinite" keyword for arrays of unknown size |

Commit Message

Dodji Seketeli Jan. 1, 2023, 5:28 p.m. UTC
  Hello,

In the ABIXML format and in diff reports, array dimensions of unknown
size are described with the "infinite" keyword.  This is not explicit
enough.  This patch uses the keyword "unknown" instead.  Note that the
keyword "infinite" is still recognized by the ABIXML reader.

	* src/abg-reader.cc (build_subrange_type, build_array_type_def):
	Support the "unknown" keyword, as well as the "infinite" keyword.
	* src/abg-reporter-priv.cc (report_size_and_alignment_changes):
	Emit the "unknown" keyword, not the "infinity" one.
	* src/abg-writer.cc (write_array_size_and_alignment): Likewise.
	* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Adjust.
	* tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-annotate/test7.so.abi: Likewise.
	* tests/data/test-read-ctf/test-array-size.abi: Likewise.
	* tests/data/test-read-ctf/test-dynamic-array.o.abi: Likewise.
	* tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
	* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test7.so.abi: Likewise.
	* tests/data/test-read-dwarf/test7.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
	* tests/data/test-read-write/test25.xml: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 src/abg-reader.cc                                |  5 +++--
 src/abg-reporter-priv.cc                         |  8 ++++----
 src/abg-writer.cc                                |  4 ++--
 .../test-annotate/libtest24-drop-fns-2.so.abi    |  4 ++--
 .../data/test-annotate/libtest24-drop-fns.so.abi |  4 ++--
 tests/data/test-annotate/test14-pr18893.so.abi   |  4 ++--
 ...est19-pr19023-libtcmalloc_and_profiler.so.abi |  4 ++--
 tests/data/test-annotate/test7.so.abi            |  4 ++--
 tests/data/test-read-ctf/test-array-size.abi     |  4 ++--
 .../data/test-read-ctf/test-dynamic-array.o.abi  |  4 ++--
 tests/data/test-read-dwarf/PR25007-sdhci.ko.abi  | 12 ++++++------
 .../test-read-dwarf/libtest24-drop-fns-2.so.abi  |  4 ++--
 .../test-read-dwarf/libtest24-drop-fns.so.abi    |  4 ++--
 .../data/test-read-dwarf/test-libandroid.so.abi  | 16 ++++++++--------
 .../test-read-dwarf/test10-pr18818-gcc.so.abi    | 12 ++++++------
 tests/data/test-read-dwarf/test11-pr18828.so.abi |  4 ++--
 tests/data/test-read-dwarf/test14-pr18893.so.abi |  4 ++--
 tests/data/test-read-dwarf/test16-pr18904.so.abi |  4 ++--
 ...est19-pr19023-libtcmalloc_and_profiler.so.abi |  4 ++--
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi    | 12 ++++++------
 tests/data/test-read-dwarf/test7.so.abi          |  4 ++--
 tests/data/test-read-dwarf/test7.so.hash.abi     |  4 ++--
 .../test-read-dwarf/test9-pr18818-clang.so.abi   |  8 ++++----
 tests/data/test-read-write/test25.xml            |  4 ++--
 24 files changed, 71 insertions(+), 70 deletions(-)
  

Patch

diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index b71ca9c2..5a4fb3c0 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -4128,7 +4128,7 @@  build_subrange_type(reader&	rdr,
   bool is_infinite = false;
   if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "length"))
     {
-      if (string(CHAR_STR(s)) == "infinite")
+      if (string(CHAR_STR(s)) == "infinite" || string(CHAR_STR(s)) == "unknown")
 	is_infinite = true;
       else
 	length = strtoull(CHAR_STR(s), NULL, 0);
@@ -4259,7 +4259,8 @@  build_array_type_def(reader&	rdr,
       size_in_bits = strtoull(CHAR_STR(s), &endptr, 0);
       if (*endptr != '\0')
 	{
-	  if (!strcmp(CHAR_STR(s), "infinite"))
+	  if (!strcmp(CHAR_STR(s), "infinite")
+	      ||!strcmp(CHAR_STR(s), "unknown"))
 	    size_in_bits = (size_t) -1;
 	  else
 	    return nil;
diff --git a/src/abg-reporter-priv.cc b/src/abg-reporter-priv.cc
index a913fa69..075d089f 100644
--- a/src/abg-reporter-priv.cc
+++ b/src/abg-reporter-priv.cc
@@ -763,12 +763,12 @@  report_size_and_alignment_changes(type_or_decl_base_sptr	first,
 	      // arrays ...
 	      out << indent << "array type size changed from ";
 	      if (first_array->is_infinite())
-		out << "infinity";
+		out << "\'unknown\'";
 	      else
 		emit_num_value(first_array->get_size_in_bits(), *ctxt, out);
 	      out << " to ";
 	      if (second_array->is_infinite())
-		out << "infinity";
+		out << "\'unknown\'";
 	      else
 		emit_num_value(second_array->get_size_in_bits(), *ctxt, out);
 	      out << "\n";
@@ -797,14 +797,14 @@  report_size_and_alignment_changes(type_or_decl_base_sptr	first,
 			  << " changed length from ";
 
 		      if ((*i)->is_infinite())
-			out << "infinity";
+			out << "\'unknown\'";
 		      else
 			out << (*i)->get_length();
 
 		      out << " to ";
 
 		      if ((*j)->is_infinite())
-			out << "infinity";
+			out << "\'unknown\'";
 		      else
 			out << (*j)->get_length();
 		      out << "\n";
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index f30ce389..1fb067b8 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -1470,7 +1470,7 @@  static void
 write_array_size_and_alignment(const shared_ptr<array_type_def> decl, ostream& o)
 {
   if (decl->is_infinite())
-    o << " size-in-bits='" << "infinite" << "'";
+    o << " size-in-bits='" << "unknown" << "'";
   else {
     size_t size_in_bits = decl->get_size_in_bits();
     if (size_in_bits)
@@ -2857,7 +2857,7 @@  write_array_subrange_type(const array_type_def::subrange_sptr&	decl,
 
   o << " length='";
   if (decl->is_infinite())
-    o << "infinite";
+    o << "unknown";
   else
     o << decl->get_length();
 
diff --git a/tests/data/test-annotate/libtest24-drop-fns-2.so.abi b/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
index 374376ae..919e06d3 100644
--- a/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
+++ b/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
@@ -255,9 +255,9 @@ 
     <!-- unsigned long int -->
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-28'/>
     <!-- unsigned long int[] -->
-    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='infinite' id='type-id-34'>
+    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='unknown' id='type-id-34'>
       <!-- <anonymous range>[] -->
-      <subrange length='infinite' id='type-id-35'/>
+      <subrange length='unknown' id='type-id-35'/>
     </array-type-def>
     <!-- unsigned long long int -->
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-36'/>
diff --git a/tests/data/test-annotate/libtest24-drop-fns.so.abi b/tests/data/test-annotate/libtest24-drop-fns.so.abi
index 374376ae..919e06d3 100644
--- a/tests/data/test-annotate/libtest24-drop-fns.so.abi
+++ b/tests/data/test-annotate/libtest24-drop-fns.so.abi
@@ -255,9 +255,9 @@ 
     <!-- unsigned long int -->
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-28'/>
     <!-- unsigned long int[] -->
-    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='infinite' id='type-id-34'>
+    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='unknown' id='type-id-34'>
       <!-- <anonymous range>[] -->
-      <subrange length='infinite' id='type-id-35'/>
+      <subrange length='unknown' id='type-id-35'/>
     </array-type-def>
     <!-- unsigned long long int -->
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-36'/>
diff --git a/tests/data/test-annotate/test14-pr18893.so.abi b/tests/data/test-annotate/test14-pr18893.so.abi
index 9259db72..08f9024f 100644
--- a/tests/data/test-annotate/test14-pr18893.so.abi
+++ b/tests/data/test-annotate/test14-pr18893.so.abi
@@ -6793,9 +6793,9 @@ 
       <subrange length='4' type-id='type-id-3' id='type-id-62'/>
     </array-type-def>
     <!-- REAL[][24][24] -->
-    <array-type-def dimensions='3' type-id='type-id-1' size-in-bits='infinite' id='type-id-134'>
+    <array-type-def dimensions='3' type-id='type-id-1' size-in-bits='unknown' id='type-id-134'>
       <!-- <anonymous range>[] -->
-      <subrange length='infinite' id='type-id-135'/>
+      <subrange length='unknown' id='type-id-135'/>
       <!-- <anonymous range>[24] -->
       <subrange length='24' type-id='type-id-3' id='type-id-136'/>
       <!-- <anonymous range>[24] -->
diff --git a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
index 64461110..cdecfae7 100644
--- a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -4160,9 +4160,9 @@ 
       <subrange length='8' type-id='type-id-19' id='type-id-176'/>
     </array-type-def>
     <!-- char[] -->
-    <array-type-def dimensions='1' type-id='type-id-84' size-in-bits='infinite' id='type-id-177'>
+    <array-type-def dimensions='1' type-id='type-id-84' size-in-bits='unknown' id='type-id-177'>
       <!-- <anonymous range>[] -->
-      <subrange length='infinite' id='type-id-178'/>
+      <subrange length='unknown' id='type-id-178'/>
     </array-type-def>
     <!-- class AddressMap<HeapProfileTable::AllocValue> -->
     <class-decl name='AddressMap&lt;HeapProfileTable::AllocValue&gt;' size-in-bits='320' visibility='default' filepath='src/addressmap-inl.h' line='104' column='1' id='type-id-179'>
diff --git a/tests/data/test-annotate/test7.so.abi b/tests/data/test-annotate/test7.so.abi
index ea7ee86c..f85708ae 100644
--- a/tests/data/test-annotate/test7.so.abi
+++ b/tests/data/test-annotate/test7.so.abi
@@ -17,9 +17,9 @@ 
       <subrange length='1' type-id='type-id-4' id='type-id-7'/>
     </array-type-def>
     <!-- char[] -->
-    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='infinite' id='type-id-8'>
+    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='unknown' id='type-id-8'>
       <!-- <anonymous range>[] -->
-      <subrange length='infinite' type-id='type-id-4' id='type-id-9'/>
+      <subrange length='unknown' type-id='type-id-4' id='type-id-9'/>
     </array-type-def>
     <!-- double -->
     <type-decl name='double' size-in-bits='64' id='type-id-10'/>
diff --git a/tests/data/test-read-ctf/test-array-size.abi b/tests/data/test-read-ctf/test-array-size.abi
index 3fbc65b6..cd1bafe6 100644
--- a/tests/data/test-read-ctf/test-array-size.abi
+++ b/tests/data/test-read-ctf/test-array-size.abi
@@ -12,8 +12,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='16' id='type-id-5'>
       <subrange length='2' type-id='type-id-3' id='type-id-6'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='infinite' id='type-id-7'>
-      <subrange length='infinite' type-id='type-id-3' id='type-id-8'/>
+    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='unknown' id='type-id-7'>
+      <subrange length='unknown' type-id='type-id-3' id='type-id-8'/>
     </array-type-def>
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-3'/>
     <var-decl name='bar' type-id='type-id-2' mangled-name='bar' visibility='default' elf-symbol-id='bar'/>
diff --git a/tests/data/test-read-ctf/test-dynamic-array.o.abi b/tests/data/test-read-ctf/test-dynamic-array.o.abi
index a8978c0c..4a919cae 100644
--- a/tests/data/test-read-ctf/test-dynamic-array.o.abi
+++ b/tests/data/test-read-ctf/test-dynamic-array.o.abi
@@ -4,8 +4,8 @@ 
   </elf-function-symbols>
   <abi-instr address-size='64' language='LANG_C'>
     <type-decl name='char' size-in-bits='8' id='type-id-1'/>
-    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='infinite' id='type-id-2'>
-      <subrange length='infinite' type-id='type-id-3' id='type-id-4'/>
+    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='unknown' id='type-id-2'>
+      <subrange length='unknown' type-id='type-id-3' id='type-id-4'/>
     </array-type-def>
     <class-decl name='S' size-in-bits='64' is-struct='yes' visibility='default' id='type-id-5'>
       <data-member access='public' layout-offset-in-bits='0'>
diff --git a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
index 5d773b00..4e4d96f6 100644
--- a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
+++ b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
@@ -236,14 +236,14 @@ 
     <array-type-def dimensions='1' type-id='type-id-73' size-in-bits='16384' id='type-id-74'>
       <subrange length='64' type-id='type-id-1' id='type-id-75'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-76' size-in-bits='infinite' id='type-id-77'>
-      <subrange length='infinite' type-id='type-id-1' id='type-id-78'/>
+    <array-type-def dimensions='1' type-id='type-id-76' size-in-bits='unknown' id='type-id-77'>
+      <subrange length='unknown' type-id='type-id-1' id='type-id-78'/>
     </array-type-def>
     <array-type-def dimensions='1' type-id='type-id-79' size-in-bits='384' id='type-id-80'>
       <subrange length='3' type-id='type-id-1' id='type-id-6'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-81' size-in-bits='infinite' id='type-id-82'>
-      <subrange length='infinite' type-id='type-id-1' id='type-id-78'/>
+    <array-type-def dimensions='1' type-id='type-id-81' size-in-bits='unknown' id='type-id-82'>
+      <subrange length='unknown' type-id='type-id-1' id='type-id-78'/>
     </array-type-def>
     <array-type-def dimensions='1' type-id='type-id-83' id='type-id-84'>
       <subrange length='3' type-id='type-id-1' id='type-id-6'/>
@@ -9171,8 +9171,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-126' size-in-bits='256' id='type-id-791'>
       <subrange length='4' type-id='type-id-1' id='type-id-19'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-126' size-in-bits='infinite' id='type-id-618'>
-      <subrange length='infinite' type-id='type-id-1' id='type-id-78'/>
+    <array-type-def dimensions='1' type-id='type-id-126' size-in-bits='unknown' id='type-id-618'>
+      <subrange length='unknown' type-id='type-id-1' id='type-id-78'/>
     </array-type-def>
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-648'/>
     <type-decl name='unsigned short int' size-in-bits='16' id='type-id-186'/>
diff --git a/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi b/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi
index ff8b1d34..01bb1a4c 100644
--- a/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi
+++ b/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi
@@ -177,8 +177,8 @@ 
     <typedef-decl name='wint_t' type-id='type-id-16' filepath='/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/stddef.h' line='357' column='1' id='type-id-33'/>
     <type-decl name='unsigned int' size-in-bits='32' id='type-id-16'/>
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-28'/>
-    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='infinite' id='type-id-34'>
-      <subrange length='infinite' id='type-id-35'/>
+    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='unknown' id='type-id-34'>
+      <subrange length='unknown' id='type-id-35'/>
     </array-type-def>
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-36'/>
     <type-decl name='wchar_t' size-in-bits='32' id='type-id-37'/>
diff --git a/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi b/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
index ff8b1d34..01bb1a4c 100644
--- a/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
+++ b/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
@@ -177,8 +177,8 @@ 
     <typedef-decl name='wint_t' type-id='type-id-16' filepath='/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/stddef.h' line='357' column='1' id='type-id-33'/>
     <type-decl name='unsigned int' size-in-bits='32' id='type-id-16'/>
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-28'/>
-    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='infinite' id='type-id-34'>
-      <subrange length='infinite' id='type-id-35'/>
+    <array-type-def dimensions='1' type-id='type-id-28' size-in-bits='unknown' id='type-id-34'>
+      <subrange length='unknown' id='type-id-35'/>
     </array-type-def>
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-36'/>
     <type-decl name='wchar_t' size-in-bits='32' id='type-id-37'/>
diff --git a/tests/data/test-read-dwarf/test-libandroid.so.abi b/tests/data/test-read-dwarf/test-libandroid.so.abi
index bb60027b..8b15c0e9 100644
--- a/tests/data/test-read-dwarf/test-libandroid.so.abi
+++ b/tests/data/test-read-dwarf/test-libandroid.so.abi
@@ -3290,8 +3290,8 @@ 
     <array-type-def dimensions='1' type-id='1b3b87e1' size-in-bits='512' id='224e4514'>
       <subrange length='16' type-id='7ff19f0f' id='848d0938'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='71ad5e8a' size-in-bits='infinite' id='86626492'>
-      <subrange length='infinite' type-id='7ff19f0f' id='031f2035'/>
+    <array-type-def dimensions='1' type-id='71ad5e8a' size-in-bits='unknown' id='86626492'>
+      <subrange length='unknown' type-id='7ff19f0f' id='031f2035'/>
     </array-type-def>
     <array-type-def dimensions='1' type-id='2d5c5fc5' size-in-bits='512' id='98ae5868'>
       <subrange length='16' type-id='7ff19f0f' id='848d0938'/>
@@ -3313,8 +3313,8 @@ 
       <base-class access='public' layout-offset-in-bits='0' type-id='baffb083'/>
     </class-decl>
     <class-decl name='_jobject' size-in-bits='8' visibility='default' filepath='libnativehelper/include_jni/jni.h' line='46' column='1' id='baffb083'/>
-    <array-type-def dimensions='1' type-id='bfebf634' size-in-bits='infinite' id='b51730a0'>
-      <subrange length='infinite' type-id='7ff19f0f' id='031f2035'/>
+    <array-type-def dimensions='1' type-id='bfebf634' size-in-bits='unknown' id='b51730a0'>
+      <subrange length='unknown' type-id='7ff19f0f' id='031f2035'/>
     </array-type-def>
     <type-decl name='double' size-in-bits='64' id='a0eb0f08'/>
     <enum-decl name='jobjectRefType' filepath='libnativehelper/include_jni/jni.h' line='121' column='1' id='4f771c8a'>
@@ -4262,8 +4262,8 @@ 
     <typedef-decl name='wctrans_t' type-id='eaa32e2f' filepath='bionic/libc/include/bits/wctype.h' line='60' column='1' id='183c72c3'/>
     <typedef-decl name='wctype_t' type-id='95e97e5f' filepath='bionic/libc/include/bits/wctype.h' line='56' column='1' id='ba50424d'/>
     <typedef-decl name='wint_t' type-id='f0981eed' filepath='bionic/libc/include/bits/wctype.h' line='36' column='1' id='6dd37369'/>
-    <array-type-def dimensions='1' type-id='8f92235e' size-in-bits='infinite' id='1e7b9b2b'>
-      <subrange length='infinite' type-id='7ff19f0f' id='031f2035'/>
+    <array-type-def dimensions='1' type-id='8f92235e' size-in-bits='unknown' id='1e7b9b2b'>
+      <subrange length='unknown' type-id='7ff19f0f' id='031f2035'/>
     </array-type-def>
     <array-type-def dimensions='1' type-id='b96825af' size-in-bits='2048' id='62946659'>
       <subrange length='256' type-id='7ff19f0f' id='36e5b9fa'/>
@@ -21259,8 +21259,8 @@ 
     </function-decl>
   </abi-instr>
   <abi-instr address-size='32' path='frameworks/base/native/android/native_window_jni.cpp' language='LANG_C_plus_plus_14'>
-    <array-type-def dimensions='1' type-id='95e97e5e' size-in-bits='infinite' id='1fdc7fa6'>
-      <subrange length='infinite' type-id='7ff19f0f' id='031f2035'/>
+    <array-type-def dimensions='1' type-id='95e97e5e' size-in-bits='unknown' id='1fdc7fa6'>
+      <subrange length='unknown' type-id='7ff19f0f' id='031f2035'/>
     </array-type-def>
     <array-type-def dimensions='1' type-id='33dbba72' size-in-bits='128' id='1595aa6b'>
       <subrange length='4' type-id='7ff19f0f' id='16fe7105'/>
diff --git a/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi b/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
index 4b876c45..3cbf69c5 100644
--- a/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
+++ b/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
@@ -729,8 +729,8 @@ 
     <typedef-decl name='wint_t' type-id='type-id-34' filepath='/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h' line='353' column='1' id='type-id-63'/>
     <type-decl name='unsigned int' size-in-bits='32' id='type-id-34'/>
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-58'/>
-    <array-type-def dimensions='1' type-id='type-id-58' size-in-bits='infinite' id='type-id-64'>
-      <subrange length='infinite' id='type-id-65'/>
+    <array-type-def dimensions='1' type-id='type-id-58' size-in-bits='unknown' id='type-id-64'>
+      <subrange length='unknown' id='type-id-65'/>
     </array-type-def>
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-66'/>
     <type-decl name='unsigned short int' size-in-bits='16' id='type-id-26'/>
@@ -3180,11 +3180,11 @@ 
     </function-type>
   </abi-instr>
   <abi-instr address-size='64' path='src/third_party/boost-1.56.0/libs/filesystem/src/operations.cpp' comp-dir-path='/home/andrew/Documents/10gen/dev/src/mongodb' language='LANG_C_plus_plus'>
-    <array-type-def dimensions='1' type-id='type-id-237' size-in-bits='infinite' id='type-id-238'>
-      <subrange length='infinite' id='type-id-65'/>
+    <array-type-def dimensions='1' type-id='type-id-237' size-in-bits='unknown' id='type-id-238'>
+      <subrange length='unknown' id='type-id-65'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-239' size-in-bits='infinite' id='type-id-240'>
-      <subrange length='infinite' id='type-id-65'/>
+    <array-type-def dimensions='1' type-id='type-id-239' size-in-bits='unknown' id='type-id-240'>
+      <subrange length='unknown' id='type-id-65'/>
     </array-type-def>
     <class-decl name='_G_fpos64_t' size-in-bits='128' is-struct='yes' naming-typedef-id='type-id-241' visibility='default' filepath='/usr/include/_G_config.h' line='27' column='1' id='type-id-242'>
       <data-member access='public' layout-offset-in-bits='0'>
diff --git a/tests/data/test-read-dwarf/test11-pr18828.so.abi b/tests/data/test-read-dwarf/test11-pr18828.so.abi
index 6217455d..925643af 100644
--- a/tests/data/test-read-dwarf/test11-pr18828.so.abi
+++ b/tests/data/test-read-dwarf/test11-pr18828.so.abi
@@ -1010,8 +1010,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-80' size-in-bits='39936' id='type-id-98'>
       <subrange length='624' type-id='type-id-3' id='type-id-99'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-80' size-in-bits='infinite' id='type-id-100'>
-      <subrange length='infinite' id='type-id-101'/>
+    <array-type-def dimensions='1' type-id='type-id-80' size-in-bits='unknown' id='type-id-100'>
+      <subrange length='unknown' id='type-id-101'/>
     </array-type-def>
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-102'/>
     <type-decl name='unsigned short int' size-in-bits='16' id='type-id-42'/>
diff --git a/tests/data/test-read-dwarf/test14-pr18893.so.abi b/tests/data/test-read-dwarf/test14-pr18893.so.abi
index 4b15b739..5ef20ee9 100644
--- a/tests/data/test-read-dwarf/test14-pr18893.so.abi
+++ b/tests/data/test-read-dwarf/test14-pr18893.so.abi
@@ -4341,8 +4341,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='128' id='type-id-133'>
       <subrange length='4' type-id='type-id-3' id='type-id-62'/>
     </array-type-def>
-    <array-type-def dimensions='3' type-id='type-id-1' size-in-bits='infinite' id='type-id-134'>
-      <subrange length='infinite' id='type-id-135'/>
+    <array-type-def dimensions='3' type-id='type-id-1' size-in-bits='unknown' id='type-id-134'>
+      <subrange length='unknown' id='type-id-135'/>
       <subrange length='24' type-id='type-id-3' id='type-id-136'/>
       <subrange length='24' type-id='type-id-3' id='type-id-136'/>
     </array-type-def>
diff --git a/tests/data/test-read-dwarf/test16-pr18904.so.abi b/tests/data/test-read-dwarf/test16-pr18904.so.abi
index a425d776..f98bbdc5 100644
--- a/tests/data/test-read-dwarf/test16-pr18904.so.abi
+++ b/tests/data/test-read-dwarf/test16-pr18904.so.abi
@@ -2174,8 +2174,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-160' size-in-bits='1152' id='type-id-163'>
       <subrange length='9' type-id='type-id-52' id='type-id-164'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-165' size-in-bits='infinite' id='type-id-166'>
-      <subrange length='infinite' type-id='type-id-52' id='type-id-167'/>
+    <array-type-def dimensions='1' type-id='type-id-165' size-in-bits='unknown' id='type-id-166'>
+      <subrange length='unknown' type-id='type-id-52' id='type-id-167'/>
     </array-type-def>
     <class-decl name='AutoData' size-in-bits='192' visibility='default' filepath='../../../gcc/liboffloadmic/runtime/offload_engine.h' line='208' column='1' id='type-id-168'>
       <data-member access='private' layout-offset-in-bits='0'>
diff --git a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
index 85a85a46..92a0b775 100644
--- a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -2377,8 +2377,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-174' size-in-bits='512' id='type-id-175'>
       <subrange length='8' type-id='type-id-19' id='type-id-176'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-84' size-in-bits='infinite' id='type-id-177'>
-      <subrange length='infinite' id='type-id-178'/>
+    <array-type-def dimensions='1' type-id='type-id-84' size-in-bits='unknown' id='type-id-177'>
+      <subrange length='unknown' id='type-id-178'/>
     </array-type-def>
     <class-decl name='AddressMap&lt;HeapProfileTable::AllocValue&gt;' size-in-bits='320' visibility='default' filepath='src/addressmap-inl.h' line='104' column='1' id='type-id-179'>
       <member-type access='private'>
diff --git a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
index dabc6417..e62b5985 100644
--- a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
+++ b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
@@ -10839,8 +10839,8 @@ 
     <type-decl name='unnamed-enum-underlying-type-32' is-anonymous='yes' size-in-bits='32' alignment-in-bits='32' id='type-id-37'/>
     <type-decl name='unsigned int' size-in-bits='32' id='type-id-39'/>
     <type-decl name='unsigned long int' size-in-bits='64' id='type-id-47'/>
-    <array-type-def dimensions='1' type-id='type-id-47' size-in-bits='infinite' id='type-id-623'>
-      <subrange length='infinite' id='type-id-624'/>
+    <array-type-def dimensions='1' type-id='type-id-47' size-in-bits='unknown' id='type-id-623'>
+      <subrange length='unknown' id='type-id-624'/>
     </array-type-def>
     <type-decl name='unsigned long long int' size-in-bits='64' id='type-id-49'/>
     <type-decl name='unsigned short int' size-in-bits='16' id='type-id-606'/>
@@ -37743,11 +37743,11 @@ 
     <type-decl name='complex double' size-in-bits='128' id='type-id-2168'/>
     <type-decl name='complex float' size-in-bits='64' id='type-id-2169'/>
     <type-decl name='complex long double' size-in-bits='256' id='type-id-2170'/>
-    <array-type-def dimensions='1' type-id='type-id-2133' size-in-bits='infinite' id='type-id-2128'>
-      <subrange length='infinite' id='type-id-624'/>
+    <array-type-def dimensions='1' type-id='type-id-2133' size-in-bits='unknown' id='type-id-2128'>
+      <subrange length='unknown' id='type-id-624'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-2121' size-in-bits='infinite' id='type-id-2127'>
-      <subrange length='infinite' id='type-id-624'/>
+    <array-type-def dimensions='1' type-id='type-id-2121' size-in-bits='unknown' id='type-id-2127'>
+      <subrange length='unknown' id='type-id-624'/>
     </array-type-def>
     <qualified-type-def type-id='type-id-51' const='yes' id='type-id-2171'/>
     <reference-type-def kind='lvalue' type-id='type-id-2171' size-in-bits='64' id='type-id-1077'/>
diff --git a/tests/data/test-read-dwarf/test7.so.abi b/tests/data/test-read-dwarf/test7.so.abi
index af702077..7068711a 100644
--- a/tests/data/test-read-dwarf/test7.so.abi
+++ b/tests/data/test-read-dwarf/test7.so.abi
@@ -10,8 +10,8 @@ 
     <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='8' id='type-id-6'>
       <subrange length='1' type-id='type-id-4' id='type-id-7'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='infinite' id='type-id-8'>
-      <subrange length='infinite' type-id='type-id-4' id='type-id-9'/>
+    <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='unknown' id='type-id-8'>
+      <subrange length='unknown' type-id='type-id-4' id='type-id-9'/>
     </array-type-def>
     <type-decl name='double' size-in-bits='64' id='type-id-10'/>
     <array-type-def dimensions='2' type-id='type-id-10' size-in-bits='960' id='type-id-11'>
diff --git a/tests/data/test-read-dwarf/test7.so.hash.abi b/tests/data/test-read-dwarf/test7.so.hash.abi
index 72223a95..0a53f0dc 100644
--- a/tests/data/test-read-dwarf/test7.so.hash.abi
+++ b/tests/data/test-read-dwarf/test7.so.hash.abi
@@ -10,8 +10,8 @@ 
     <array-type-def dimensions='1' type-id='a84c031d' size-in-bits='8' id='89feb1ec'>
       <subrange length='1' type-id='4c87fef4' id='52f813b4'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='a84c031d' size-in-bits='infinite' id='e84913bd'>
-      <subrange length='infinite' type-id='4c87fef4' id='031f2035'/>
+    <array-type-def dimensions='1' type-id='a84c031d' size-in-bits='unknown' id='e84913bd'>
+      <subrange length='unknown' type-id='4c87fef4' id='031f2035'/>
     </array-type-def>
     <type-decl name='double' size-in-bits='64' id='a0eb0f08'/>
     <array-type-def dimensions='2' type-id='a0eb0f08' size-in-bits='960' id='9ba86d8c'>
diff --git a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi
index 0c56c603..3557763c 100644
--- a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi
+++ b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi
@@ -1806,11 +1806,11 @@ 
     </function-type>
   </abi-instr>
   <abi-instr address-size='64' path='src/third_party/boost-1.56.0/libs/filesystem/src/operations.cpp' comp-dir-path='/home/andrew/Documents/10gen/dev/src/mongodb' language='LANG_C_plus_plus'>
-    <array-type-def dimensions='1' type-id='type-id-122' size-in-bits='infinite' id='type-id-123'>
-      <subrange length='infinite' type-id='type-id-4' id='type-id-124'/>
+    <array-type-def dimensions='1' type-id='type-id-122' size-in-bits='unknown' id='type-id-123'>
+      <subrange length='unknown' type-id='type-id-4' id='type-id-124'/>
     </array-type-def>
-    <array-type-def dimensions='1' type-id='type-id-125' size-in-bits='infinite' id='type-id-126'>
-      <subrange length='infinite' type-id='type-id-4' id='type-id-124'/>
+    <array-type-def dimensions='1' type-id='type-id-125' size-in-bits='unknown' id='type-id-126'>
+      <subrange length='unknown' type-id='type-id-4' id='type-id-124'/>
     </array-type-def>
     <typedef-decl name='_Atomic_word' type-id='type-id-8' filepath='/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9/bits/atomic_word.h' line='32' column='1' id='type-id-127'/>
     <typedef-decl name='_G_fpos64_t' type-id='type-id-13' filepath='/usr/include/_G_config.h' line='30' column='1' id='type-id-128'/>
diff --git a/tests/data/test-read-write/test25.xml b/tests/data/test-read-write/test25.xml
index 8f6ad94f..04a3cb29 100644
--- a/tests/data/test-read-write/test25.xml
+++ b/tests/data/test-read-write/test25.xml
@@ -3,8 +3,8 @@ 
   <array-type-def dimensions='1' type-id='type-id-2' size-in-bits='448' alignment-in-bits='64' id='type-id-3'>
     <subrange length='7' id='type-id-4'/>
   </array-type-def>
-  <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='infinite' alignment-in-bits='8' id='type-id-5'>
-    <subrange length='infinite' id='type-id-6'/>
+  <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='unknown' alignment-in-bits='8' id='type-id-5'>
+    <subrange length='unknown' id='type-id-6'/>
   </array-type-def>
   <class-decl name='S' size-in-bits='2240' is-struct='yes' visibility='default' id='type-id-7'>
     <data-member access='public' layout-offset-in-bits='0'>