From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 24 22:59:31 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E719810656DD for ; Mon, 24 Nov 2008 22:59:31 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from istc.kiev.ua (wolf.istc.kiev.ua [193.108.236.1]) by mx1.freebsd.org (Postfix) with ESMTP id A330C8FC24 for ; Mon, 24 Nov 2008 22:59:31 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from [91.123.146.100] (helo=ravenloft.kiev.ua) by istc.kiev.ua with esmtp (Exim 4.52) id 1L4jWU-0007d5-W4; Tue, 25 Nov 2008 00:03:15 +0200 Date: Tue, 25 Nov 2008 00:03:11 +0200 From: Alex Kozlov To: "Sam Fourman Jr." , Gerald Pfeifer , Jan Henrik Sylvester , freebsd-emulation@freebsd.org, spam@rm-rf.kiev.ua Message-ID: <20081124220311.GA14308@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 2.0 (++) X-Spam-Report: Content analysis detailz: (2.0 points, 10.0 required) * 2.0 DNS_FROM_SECURITYSAGE RBL: Envelope sender in * blackholes.securitysage.com Cc: Subject: Re: wine-1.1.8 regression -- wine: could not load L"...": Invalid address X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 22:59:32 -0000 On Mon, Nov 24, 2008 at 03:07:21AM -0600, Sam Fourman Jr. wrote: > On Sun, Nov 23, 2008 at 5:41 PM, Gerald Pfeifer wrote: >> On Mon, 10 Nov 2008, Jan Henrik Sylvester wrote: >>> On wine-1.1.8, I cannot run many application that used to run fine on >>> wine-1.1.7, for example an old version (4.10) of irfanview: >>> wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address > it would appear World of warcraft is still broken. it works fine in 1.1.7 > wine: could not load L"C:\\Program Files\\World of Warcraft\\Wow.exe": > Invalid address Can You please test this patch? (Drop it in emulators/wine/files) Thanks. Index: dlls/ntdll/virtual.c @@ -1250,8 +1254,13 @@ } /* try to find space in a reserved area for the virtual heap */ - if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 1 )) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + heap_base = wine_anon_mmap( address_space_limit - 10 * VIRTUAL_HEAP_SIZE, + VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); +#else + if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) heap_base = wine_anon_mmap( NULL, VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); +#endif assert( heap_base != (void *)-1 ); virtual_heap = RtlCreateHeap( HEAP_NO_SERIALIZE, heap_base, VIRTUAL_HEAP_SIZE, -- Adios