Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tcf-dev] [Bug 310607] New: C agent not correctly handling the endianness of the symbol table entries

https://bugs.eclipse.org/bugs/show_bug.cgi?id=310607 
Product/Component: Target Management / TCF

           Summary: C agent not correctly handling the endianness of the
                    symbol table entries
    Classification: DSDP
           Product: Target Management
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: TCF
        AssignedTo: dsdp.tm.tcf-inbox@xxxxxxxxxxx
        ReportedBy: Emilio.Monti@xxxxxxx
         QAContact: martin.oberhuber@xxxxxxxxxxxxx


In "services/dwarfcache.c", in the function "load_symbol_tables", the symbol
section is loaded with the file endianness intact:

elf_load(sym_sec)

After few lines, a Elf64_Sym or Elf32_Sym is mapped to a pointer in this memory
area without SWAPping the bytes of it fields.

for (i = 0; i < tbl->sym_cnt; i++) {

   Elf64_Sym * s = (Elf64_Sym *)tbl->mSymPool + i;

   Elf32_Sym * s = (Elf32_Sym *)tbl->mSymPool + i;

   Name = s->st_name;

To stress this bug you need to use a Big Endian elf file in a Little Endian
machine, or vice versa.

The immediate effect is a very likely assertion error:

assert(Name < tbl->mStrPoolSize);

-- 
Configure bugmail: https://bugs.eclipse.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


Back to the top