linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vegard Nossum <vegard.nossum@gmail.com>
To: linux-sparse@vger.kernel.org
Subject: Memory corruption with long filenames
Date: Sun, 25 May 2008 13:21:21 +0200	[thread overview]
Message-ID: <20080525112121.GA15577@damson.getinternet.no> (raw)

Hi,

Running sparse with this single line as the input file:

#include "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

(yes, that's exactly 257 "x"es)

gives me this peculiar message:

crash.c:1:10: error: unable to open 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/usr/lib/gcc/i386-redhat-linux/4.1.2/include/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/'

Running it under valgrind gives a bit more info:

==15582== Source and destination overlap in memcpy(0x80A1BC0, 0x80A1AC0, 257)
==15582==    at 0x4024116: memcpy (mc_replace_strmem.c:116)
==15582==    by 0x8078E07: try_include (pre-process.c:713)
==15582==    by 0x807B6F7: handle_include_path (pre-process.c:732)
==15582==    by 0x807A476: preprocess (pre-process.c:1682)
==15582==    by 0x804EB70: sparse_tokenstream (lib.c:751)
==15582==    by 0x804FC1D: sparse (lib.c:878)
==15582==    by 0x804A613: main (sparse.c:606)

But I don't know how to best fix this, so I'm simply posting the report here.

Thanks :-)


Vegard

                 reply	other threads:[~2008-05-25 11:21 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=20080525112121.GA15577@damson.getinternet.no \
    --to=vegard.nossum@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).