mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 08:45:44 +02:00
Add check in DwarfReader to avoid exception being caught
- In init, don't bother looking for a special note section if the note section size isn't greater than 12 bytes Change-Id: I57d2d7b0229996edcb1b4149c391e91b0472beea Reviewed-on: https://git.eclipse.org/r/25822 Tested-by: Hudson CI Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
This commit is contained in:
parent
82853c889d
commit
6f9b0cd178
1 changed files with 38 additions and 36 deletions
|
@ -98,6 +98,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions
|
||||||
for (Section section : sections) {
|
for (Section section : sections) {
|
||||||
if (section.sh_type == Elf.Section.SHT_NOTE) {
|
if (section.sh_type == Elf.Section.SHT_NOTE) {
|
||||||
ByteBuffer data = section.mapSectionData();
|
ByteBuffer data = section.mapSectionData();
|
||||||
|
if (data.remaining() > 12) {
|
||||||
try {
|
try {
|
||||||
// Read .note section, looking to see if it is named "GNU" and is of GNU_BUILD_ID type
|
// Read .note section, looking to see if it is named "GNU" and is of GNU_BUILD_ID type
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
@ -140,6 +141,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!have_build_id) {
|
if (!have_build_id) {
|
||||||
// No build-id. Look for a .gnu_debuglink section which will have the name of the debug info file
|
// No build-id. Look for a .gnu_debuglink section which will have the name of the debug info file
|
||||||
|
|
Loading…
Add table
Reference in a new issue