summaryrefslogtreecommitdiff
path: root/binutils/testsuite/binutils-all/debug_str.s
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-12-23 14:38:46 +0000
committer <>2015-05-26 15:48:41 +0000
commit5500a97a2ad1735db5b35bc51cfb825c1f4c38df (patch)
treecc6e777c26142b88456ff03a672e1cb69215fc32 /binutils/testsuite/binutils-all/debug_str.s
downloadbinutils-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_binutils-tarball/binutils-2.25.tar.bz2.HEADbinutils-2.25master
Diffstat (limited to 'binutils/testsuite/binutils-all/debug_str.s')
-rw-r--r--binutils/testsuite/binutils-all/debug_str.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/debug_str.s b/binutils/testsuite/binutils-all/debug_str.s
new file mode 100644
index 0000000..485d0cc
--- /dev/null
+++ b/binutils/testsuite/binutils-all/debug_str.s
@@ -0,0 +1,12 @@
+/* This test is derived from a C source file which, when compiled by gcc
+ with debugging enabled, managed to create a .debug_str section whose
+ first string was ZLIB_VER_SUBVERSION. The code in bfd/compress.c
+ used to just check for the characters "ZLIB" at the start of a section
+ and then assume that the section was compressed. This meant that the BFD
+ library then processed the next 8 bytes as if they were the size of the
+ decompressed version of the section. Naturally with this test case the
+ resulting size was gigantic and consequently the library quickly ran out
+ of memory. */
+
+ .section .debug_str,"MS",@progbits,1
+ .string "ZLIB_VER_SUBREVISION 0"