Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2011-12-19 22:14:38 +0000
committerEugene Tarassov2011-12-19 22:14:38 +0000
commit7fe62f3335994e18c69a462bef2fe95bcb66d6e5 (patch)
tree02969b6f825a5dda86f11a924f932810891e1dd6
parentaaf5245d358f281a937c04b3f89c663a1a8bc5ef (diff)
downloadorg.eclipse.tcf.agent-7fe62f3335994e18c69a462bef2fe95bcb66d6e5.tar.gz
org.eclipse.tcf.agent-7fe62f3335994e18c69a462bef2fe95bcb66d6e5.tar.xz
org.eclipse.tcf.agent-7fe62f3335994e18c69a462bef2fe95bcb66d6e5.zip
TCF Agent: fixed a regression: page fault in create_elf_cache().
-rw-r--r--agent/tcf/services/tcf_elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/agent/tcf/services/tcf_elf.c b/agent/tcf/services/tcf_elf.c
index 0a25b2b2..223d1d36 100644
--- a/agent/tcf/services/tcf_elf.c
+++ b/agent/tcf/services/tcf_elf.c
@@ -324,6 +324,7 @@ static char * get_debug_info_file_name(ELF_File * file, int * error) {
static int is_debug_info_file(ELF_File * file) {
unsigned i = 0;
if (strcmp(file->name + strlen(file->name) - 6, ".debug") == 0) return 1;
+ if (file->section_cnt == 0) return 0;
for (i = 1; i < file->section_cnt - 1; i++) {
ELF_Section * sec = file->sections + i;
if (sec->size > 0 && sec->type == SHT_NOBITS && sec->name != NULL) {

Back to the top