]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas .file sanity check
authorAlan Modra <amodra@gmail.com>
Wed, 14 May 2025 05:18:33 +0000 (14:48 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 14 May 2025 12:25:11 +0000 (21:55 +0930)
commit714cd7b1b4758a4534f3647edbbc931311e43652
tree134bffb1ac4cd11b35a27606119679e43627eee6
parent3222beac6e51002edb20f2f05b4bfe769347244b
gas .file sanity check

Currently we allow insane file numbers that cause gas to allocate up
to 4G of memory for a file array.  Trim that a little to 1G (which
still allows insane file numbers up to 33554431), and tidy function
parameter types so that we only need one file number sanity check.

* dwarf2dbg.c (assign_file_to_slot): Take a valueT file number.
Reduce max files array size.
(allocate_filename_to_slot): Take a valueT file number.
(dwarf2_directive_filename): Don't duplicate file number
sanity check here.
gas/dwarf2dbg.c