|
From: Tom H. <to...@co...> - 2014-09-30 07:53:24
|
On 30/09/14 08:34, Marcin Ślusarz wrote:
> On Mon, Sep 29, 2014 at 06:00:46PM -0500, Rich Coe wrote:
>> Marcin
>> Check the return value of mmap() and if -1, print out the
>> value of errno.
>
> Indeed, it returns MAP_FAILED and sets errno to 22 (EINVAL).
>
>> Also, what hardware platform is this?
>
> amd64 (Intel Core i5)
>
> sw is Linux 3.15/glibc 2.19.
>
>> I'm guessing valgrind may be inforcing an alignment that system
>> mmap is not.
>
> Yeah, sounds right.
This seems to be a known feature - coregrind/m_syswrap/syswrap-generic says:
if (!VG_IS_PAGE_ALIGNED(arg1)) {
/* zap any misaligned addresses. */
/* SuSV3 says misaligned addresses only cause the MAP_FIXED case
to fail. Here, we catch them all. */
return VG_(mk_SysRes_Error)( VKI_EINVAL );
}
Best to open a bug anyway.
Tom
--
Tom Hughes (to...@co...)
http://compton.nu/
|