Changeset 9cb19ded in rtems


Ignore:
Timestamp:
Aug 4, 2019, 11:58:07 PM (3 weeks ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
a4d7e4ce
Parents:
886956a
git-author:
Chris Johns <chrisj@…> (08/04/19 23:58:07)
git-committer:
Chris Johns <chrisj@…> (08/11/19 22:49:33)
Message:

libdl/debugger: Fix the broken list delete when unloading an object module.

Closes #3777

Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • cpukit/libdl/rtl-debugger.c

    r886956a r9cb19ded  
    6565  {
    6666    _rtld_debug.r_map = l;
    67     return true;
    6867  }
    69 
    70   for (prev = _rtld_debug.r_map; prev->l_next != NULL; prev = prev->l_next);
    71 
    72   l->l_prev = prev;
    73   prev->l_next = l;
     68  else
     69  {
     70    for (prev = _rtld_debug.r_map; prev->l_next != NULL; prev = prev->l_next);
     71    l->l_prev = prev;
     72    prev->l_next = l;
     73  }
    7474
    7575  return true;
     
    8080{
    8181  struct link_map* l = obj->linkmap;
     82
    8283  /*
    8384   *  link_maps are allocated together if not 1
     
    8586  struct link_map* e = l + obj->obj_num - 1;
    8687
    87   while (e && e->l_next) e = e->l_next;
    88 
    8988  if (l->l_prev == NULL)
    9089  {
    9190    if ((_rtld_debug.r_map = e->l_next) != NULL)
    92       e->l_next->l_prev = NULL;
    93     return;
     91     _rtld_debug.r_map->l_prev = NULL;
    9492  }
    95 
    96   if ((l->l_prev->l_next = e->l_next) != NULL)
    97     e->l_next->l_prev = l->l_prev;
     93  else
     94  {
     95    if ((l->l_prev->l_next = e->l_next) != NULL)
     96      e->l_next->l_prev = l->l_prev;
     97  }
    9898}
  • cpukit/libdl/rtl-elf.c

    r886956a r9cb19ded  
    15941594
    15951595  sd = obj->linkmap->sec_detail;
    1596   sections = &obj->sections;
    1597   node = rtems_chain_first (sections);
    15981596
    15991597  for (m = 0; m < sect_masks; ++m)
Note: See TracChangeset for help on using the changeset viewer.