X-Spam-Check-By: sourceware.org Date: Sun, 27 Nov 2005 14:06:52 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: mmap() on 64K aligned address fails Message-ID: <20051127130652.GT2999@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20051126180331 DOT GI5074 AT bouh DOT residence DOT ens-lyon DOT fr> <20051126214701 DOT GW5074 AT bouh DOT residence DOT ens-lyon DOT fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Nov 26 18:41, Ren? Berber wrote: > René Berber wrote: > [snip] > > mmap() is returning an error code, probably EINVAL I just ddisn't care to look > didn't > > what was it because there shouldn't be an error. > > Yes, using perror I get "Invalid argument", so the implementation considers > mmap(0x470000, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L) > somehow an invalid invocation. I didn't inspect the testcase all too closely since it's annoyingly long for such a simple test. But what exactly do you expect when trying to mmap an arbitrary memory address in the virtual address space which you know nothing about? The code is making invalid assumptions about the usage of the underlying memory layout. Don't use MAP_FIXED unless you know what you're doing. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/