Subject: kern/12109: linux emul broken, netscape 4.03 crashes on i386
To: None <>
From: Ross Harvey <>
List: netbsd-bugs
Date: 02/01/2001 17:06:17
>Number:         12109
>Category:       kern
>Synopsis:       linux emul broken, netscape 4.03 crashes on i386
>Confidential:   yes
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 01 17:09:00 PST 2001
>Originator:     Ross Harvey
>Release:        NetBSD-current Thu Feb  1 17:03:13 PST 2001
System: NetBSD sigmet 1.5R NetBSD 1.5R (skb) #16: Thu Feb 1 15:30:55 PST 2001 ross@sigmet:/usr/ross/skb i386

	Changes made recently adding CHECK_ALT_SYMLINK() break
	Netscape 4.03 and presumably other emulated binaries.
	I suspect that the recently reported Applixware problems
	are the same.

	I'm not sure why the CHECK_ALT_SYMLINK() were even made in
	the first place. The commit log states that it closes a PR,
	however, the PR was opened by the developer that made the
	mod and it described a purely hypothetical problem. I suspect
	that, in addition to the current problems, the new code will
	cause as many problems as it resolves. I bet I could make a
	few hypothetical cases that argued for the old way.

	Whatever, something needs to change. I suggest just backing
	it all out.
	Run Netscape 4.03 or an Applixware binary on -current.
	Contact me if you want to test my exact netscape binary.

	Revert the CHECK_ALT_SYMLINK() mods or apply the following
	crude patch just to get going:

Index: linux_file.c
RCS file: /cvsroot/syssrc/sys/compat/linux/common/linux_file.c,v
retrieving revision 1.37
diff -u -r1.37 linux_file.c
--- linux_file.c	2001/01/22 21:31:37	1.37
+++ linux_file.c	2001/02/02 00:54:43
@@ -479,6 +479,8 @@
 	return 0;
+int enable_hrh = 0;
 static int
 linux_stat1(p, v, retval, dolstat)
 	struct proc *p;
@@ -495,7 +497,8 @@
 	sg = stackgap_init(p->p_emul);
 	st = stackgap_alloc(&sg, sizeof (struct stat));
-	if (dolstat)
+	if (enable_hrh && dolstat)
 		CHECK_ALT_SYMLINK(p, &sg, SCARG(uap, path));
 		CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));