From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 12:57:37 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8867816A400 for ; Wed, 28 Jun 2006 12:57:37 +0000 (UTC) (envelope-from asgard@etersoft.ru) Received: from office.etersoft.ru (office.etersoft.ru [87.249.47.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A74B43D79 for ; Wed, 28 Jun 2006 12:57:36 +0000 (GMT) (envelope-from asgard@etersoft.ru) Received: from [192.168.0.22] (sempron.office.etersoft.ru [192.168.0.22]) by office.etersoft.ru (Postfix) with ESMTP id 0225244681 for ; Wed, 28 Jun 2006 16:57:35 +0400 (MSD) Message-ID: <44A27CBE.8060402@etersoft.ru> Date: Wed, 28 Jun 2006 16:57:34 +0400 From: asgard User-Agent: Thunderbird 1.5.0.2 (X11/20060502) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 28 Jun 2006 13:04:13 +0000 Cc: Subject: wine: mapping memory problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 12:57:37 -0000 hi, all. in wine project there are few problems on freebsd with windows 16-bits programs. when you'll run such program, wine will crashed with stack overflow. in fact, on freebsd wine doesn't map 1st megabyte of virtual memory, but it should. see ./libs/wine/mmap.c ./dlls/winedos/dosmem.c ./libs/wine/ldt.c in dosmem.c DOSMEM_system should has mapped address, but programs crashes on memset: static void DOSMEM_FillBiosSegments(void) { BYTE *pBiosSys = (BYTE*)DOSMEM_dosmem + 0xf0000; BYTE *pBiosROMTable = pBiosSys+0xe6f5; BIOSDATA *pBiosData = DOSVM_BiosData(); /* in this case *pBiosData = (BIOSDATA *)(DOSMEM_sysmem + 0x400);*/ static const char bios_date[] = "13/01/99"; /* Clear all unused values */ memset( pBiosData, 0, sizeof(*pBiosData) ); /* !!crashes here!! */ /* ... */ have you any suggestions how to resolve this problem? beforehand 10x for help.