CCAN Archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: David Gibson <david@gibson.dropbear.id.au>, Dan Good <dan@gooddan.com>
Cc: ccan@lists.ozlabs.org
Subject: Re: Test failure in rszshm
Date: Wed, 03 Feb 2016 16:22:09 +1030	[thread overview]
Message-ID: <87fuxabat2.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20160202133632.GE15080@voom.fritz.box>

David Gibson <david@gibson.dropbear.id.au> writes:
> On Mon, Feb 01, 2016 at 04:15:06PM +0000, Dan Good wrote:
>> That particular test is asking mmap to create a mapping of size UINT64_MAX
>> and expecting it to fail with ENOMEM.  Are you getting a different
>> errno?
>
> Yes, it seems I'm getting EINVAL.  But the EINVAL is coming from the
> mmap() call, *not* the initial tests in rszshm_mk() which explicitly
> set EINVAL.
>
> But what's *really* weird, is I get it when I run ccanlint directly,
> but not when it then re-runs the tests under gdb.  And as far as I can
> tell mmap() is getting exactly the same arguments :/.

I get no error when I run it directly, and error under ccanlint,
and success under GDB.

Ah, valgrind!  In particular, it returns EINVAL instead of ENOMEM when
you ask it to mmap 18446744073709547520 bytes address.

And then it fails due to:

==29368== Invalid read of size 4
==29368==    at 0x4033BC: main (run.c:138)
==29368==  Address 0x400000000018 is not stack'd, malloc'd or (recently) free'd

So, this needs valgrind disabled as well.

Assuming that's OK, I've pushed that for now.

Cheers,
Rusty.
_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

      reply	other threads:[~2016-02-03  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 11:08 Test failure in rszshm David Gibson
     [not found] ` <CACNkOJNJS=8MOqHQA-kGwJV6odXzYY3Tz2HjmWuaj_0tPg_yYQ@mail.gmail.com>
2016-02-02 13:36   ` David Gibson
2016-02-03  5:52     ` Rusty Russell [this message]

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=87fuxabat2.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=ccan@lists.ozlabs.org \
    --cc=dan@gooddan.com \
    --cc=david@gibson.dropbear.id.au \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).