From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13979 invoked by alias); 17 Jul 2008 21:18:01 -0000 Received: (qmail 13932 invoked by uid 22791); 17 Jul 2008 21:18:01 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 Jul 2008 21:17:44 +0000 Received: from spaceape12.eur.corp.google.com (spaceape12.eur.corp.google.com [172.28.16.146]) by smtp-out.google.com with ESMTP id m6HLHc5L004689 for ; Thu, 17 Jul 2008 22:17:38 +0100 Received: from qw-out-1920.google.com (qwj9.prod.google.com [10.241.195.73]) by spaceape12.eur.corp.google.com with ESMTP id m6HLHb5C009943 for ; Thu, 17 Jul 2008 22:17:37 +0100 Received: by qw-out-1920.google.com with SMTP id 9so74358qwj.38 for ; Thu, 17 Jul 2008 14:17:36 -0700 (PDT) Received: by 10.151.155.12 with SMTP id h12mr1117987ybo.3.1216329456754; Thu, 17 Jul 2008 14:17:36 -0700 (PDT) Received: by 10.151.109.14 with HTTP; Thu, 17 Jul 2008 14:17:36 -0700 (PDT) Message-ID: <8ac60eac0807171417h37cbe7d4x860d528d80358c8e@mail.gmail.com> Date: Thu, 17 Jul 2008 21:18:00 -0000 From: "Paul Pluzhnikov" To: gdb-patches@sourceware.org Subject: Re: [RFC] Detect loops in the solib chain In-Reply-To: <20080717205721.GA19882@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080717205721.GA19882@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00350.txt.bz2 On Thu, Jul 17, 2008 at 1:57 PM, Daniel Jacobowitz wrote: > The best I could think of was to detect cycles. This is a double-linked list. You could also check that lm->l_next == NULL || lm->l_next->l_prev == lm -- Paul Pluzhnikov