Bug#672415: [pkg-wine-party] Bug#672415: Bug#672415: virtual memory allocation problem on kfreebsd-i386 (solved in wine 1.4)

2012-05-20 Thread Hilko Bengen
* Robert Millan:

 It works (tested with notepad).  You need both patches, the one you
 provided + 535a55ec9eff83ac1cdf58a6514f4a76cab46a57.

Thanks. I will prepare another NMU containing these fixes once 1.2.3-0.2
has hit unstable.

Cheers,
-Hilko



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#672415: [pkg-wine-party] Bug#672415: Bug#672415: virtual memory allocation problem on kfreebsd-i386 (solved in wine 1.4)

2012-05-19 Thread Robert Millan
2012/5/18 Hilko Bengen ben...@debian.org:
 But please don't guess, one would have to test it.  If you intend to
 aim for 1.2 I'll be glad to help, just let me know.

 It turns out this is Wine Bug#20314 and that four patches by Austin
 English titled {libwine,server,ntdll,loader}: Add missing checks for
 FreeBSD_kernel. are needed. (They don't apply as-is to 1.2.3, but
 whatever.)

 I have only been able to briefly test the attached patch with a
 console-only program (cmd.exe) which had failed previously with the
 memor allocation problem.

 Could you please verify that the patch fixes the problem?

Uhm that won't be enough, you need at least
535a55ec9eff83ac1cdf58a6514f4a76cab46a57 (I know because I traced this
problem myself back then).

I'll test a combination of what you sent me +
535a55ec9eff83ac1cdf58a6514f4a76cab46a57

-- 
Robert Millan



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#672415: [pkg-wine-party] Bug#672415: Bug#672415: virtual memory allocation problem on kfreebsd-i386 (solved in wine 1.4)

2012-05-19 Thread Robert Millan
2012/5/19 Robert Millan r...@debian.org:
 Uhm that won't be enough, you need at least
 535a55ec9eff83ac1cdf58a6514f4a76cab46a57 (I know because I traced this
 problem myself back then).

 I'll test a combination of what you sent me +
 535a55ec9eff83ac1cdf58a6514f4a76cab46a57

It works (tested with notepad).  You need both patches, the one you
provided + 535a55ec9eff83ac1cdf58a6514f4a76cab46a57.

-- 
Robert Millan



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#672415: [pkg-wine-party] Bug#672415: Bug#672415: virtual memory allocation problem on kfreebsd-i386 (solved in wine 1.4)

2012-05-18 Thread Hilko Bengen
tag 672415 +patch
thank you

 But please don't guess, one would have to test it.  If you intend to
 aim for 1.2 I'll be glad to help, just let me know.

It turns out this is Wine Bug#20314 and that four patches by Austin
English titled {libwine,server,ntdll,loader}: Add missing checks for
FreeBSD_kernel. are needed. (They don't apply as-is to 1.2.3, but
whatever.)

I have only been able to briefly test the attached patch with a
console-only program (cmd.exe) which had failed previously with the
memor allocation problem.

Could you please verify that the patch fixes the problem?

Cheers,
-Hilko
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 3cbcbe7..bb5c1e5 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1132,7 +1132,7 @@ void fill_cpu_info(void)
 fclose(f);
 }
 }
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
 {
 int ret, num;
 size_t len;
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index c08693e..9603f56 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -210,6 +210,8 @@ typedef struct trapframe SIGCONTEXT;
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 
+#include machine/trap.h
+
 typedef struct sigcontext SIGCONTEXT;
 
 #define EAX_sig(context) ((context)-sc_eax)
@@ -428,7 +430,7 @@ extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context );
 enum i386_trap_code
 {
 TRAP_x86_UNKNOWN= -1,  /* Unknown fault (TRAP_sig not defined) */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
 TRAP_x86_DIVIDE = T_DIVIDE, /* Division by zero exception */
 TRAP_x86_TRCTRAP= T_TRCTRAP,/* Single-step exception */
 TRAP_x86_NMI= T_NMI,/* NMI interrupt */
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 48f8b6d..4807103 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -136,7 +136,7 @@ extern int arch_prctl(int func, void *ptr);
 
 #define FPU_sig(context) ((XMM_SAVE_AREA32 *)((context)-uc_mcontext.fpregs))
 
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
 #include sys/ucontext.h
 
 #define RAX_sig(context) ((context)-uc_mcontext.mc_rax)
@@ -2335,7 +2335,7 @@ void signal_init_thread( TEB *teb )
 
 #if defined __linux__
 arch_prctl( ARCH_SET_GS, teb );
-#elif defined __FreeBSD__
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 amd64_set_gsbase( teb );
 #else
 # error Please define setting %gs for your architecture
diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c
index d56790f..94f15c6 100644
--- a/libs/wine/ldt.c
+++ b/libs/wine/ldt.c
@@ -434,7 +434,7 @@ void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry )
 ldt_info.entry_number = sel  3;
 fill_modify_ldt_struct( ldt_info, entry );
 if ((ret = set_thread_area( ldt_info )  0)) perror( set_thread_area );
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
 i386_set_fsbase( wine_ldt_get_base( entry ));
 #endif
 }
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index b400189..db80e35 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -375,7 +375,7 @@ void mmap_init(void)
 char *base = stack_ptr - ((unsigned int)stack_ptr  granularity_mask) - (granularity_mask + 1);
 if (base  user_space_limit) reserve_area( user_space_limit, base );
 base = stack_ptr - ((unsigned int)stack_ptr  granularity_mask) + (granularity_mask + 1);
-#if defined(linux) || defined(__FreeBSD__)
+#if defined(linux) || defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
 /* Heuristic: assume the stack is near the end of the address */
 /* space, this avoids a lot of futile allocation attempts */
 end = (char *)(((unsigned long)base + 0x0fff)  0xf000);
diff --git a/loader/main.c b/loader/main.c
index 628a0fa..5bb4e80 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -164,7 +164,7 @@ static int pre_exec(void)
 return 1;
 }
 
-#elif defined(__FreeBSD__)  defined(__i386__)
+#elif (defined(__FreeBSD__) || defined (__FreeBSD_kernel__))  defined(__i386__)
 
 static int pre_exec(void)
 {
diff --git a/server/ptrace.c b/server/ptrace.c
index 111368b..e6c43b3 100644
--- a/server/ptrace.c
+++ b/server/ptrace.c
@@ -235,7 +235,7 @@ static inline int tkill( int tgid, int pid, int sig )
 if (ret = 0) return ret;
 errno = -ret;
 return -1;
-#elif defined(__FreeBSD__)  defined(HAVE_THR_KILL2)
+#elif (defined(__FreeBSD__) || defined (__FreeBSD_kernel__))  defined(HAVE_THR_KILL2)
 return thr_kill2( tgid, pid, sig );
 #else
 errno = ENOSYS;