David Gibson <da...@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 via email to