mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [SPARSE] seg fault problems.
Date: Tue, 17 Jun 2003 09:43:19 -0400	[thread overview]
Message-ID: <20030617134319.GN20872@michonline.com> (raw)


For a while now, I've been getting a segfault everytime I run "check"
(even on a tree without any of my hackery in it.)

The segfault is here:
0x0804ff15 in add_ptr_list (listp=0x80609c0, ptr=0x40a04f84) at lib.c:207
207             if (!list || (nr = list->nr) >= LIST_NODE_NR) {

This is why:
(gdb) p *listp
$1 = (struct ptr_list *) 0x1

Tracking things back, I get:
(gdb) bt
#0  0x0804ff15 in add_ptr_list (listp=0x80609c0, ptr=0x40a04f84) at lib.c:207
#1  0x0804b855 in add_symbol (list=0x80609c0, sym=0x40a04f84) at lib.h:71
#2  0x0804b486 in parse_function_body (token=0x4066094c, decl=0x40a04f84, list=0x80609c0) at parse.c:1081
#3  0x0804b609 in external_declaration (token=0x40660884, list=0x80609c0) at parse.c:1121
#4  0x0804b832 in translation_unit (token=0x406607d0, list=0x80609c0) at parse.c:1167
#5  0x08048d44 in main (argc=7, argv=0xbffff774) at check.c:178

check.c:178 is:
        translation_unit(token, &used_list);

Putting a watch on used_list==0x1, it changes from 0 to 1 here:

preprocessor_if (token=0x4022664c, true=0) at pre-process.c:683
683             if (false_nesting || !true) {

or more accurately, here:
        if (false_nesting || !true) {
                false_nesting++;
                return 1;
        }

I'm completely not understanding what's going on here - used_list goes
from 0x0 to 0x1 a lot, and it doesn't seem to fail except in a path that
triggers in a few cases.

Got anything else I can do to help track this down?

-- 

Ryan Anderson
  sometimes Pug Majere

                 reply	other threads:[~2003-06-17 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030617134319.GN20872@michonline.com \
    --to=ryan@michonline.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®