This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Detect loops in the solib chain


On Thu, Jul 17, 2008 at 2:40 PM, Daniel Jacobowitz <drow@false.org> wrote:

> @@ -784,14 +792,21 @@ svr4_current_sos (void)
>
>       read_memory (lm, new->lm_info->lm, lmo->link_map_size);
>
> -      lm = LM_NEXT (new);
> +      next_lm = LM_NEXT (new);
> +
> +      if (prev_lm != 0 && LM_PREV (new) != prev_lm && ldsomap == 0)

I think you want just:

+      if (LM_PREV (new) != prev_lm)

First entry on the list should also be properly terminated, and
ldsomap has nothing to do with whether the list is corrupt or not.


-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]