This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix i386 memmove issue [BZ #22644]


On Mär 19 2018, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:

> +static void
> +do_test2 (void)
> +{
> +  uint32_t num = 0x20000000;
> +  uint32_t * large_buf;
> +
> +  large_buf = mmap ((void*)0x70000000, num, PROT_READ | PROT_WRITE,
> +     MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);

Since you are using MAP_FIXED this may overwrite an existing mapping.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]