Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2003 11:49:12 -0800 (PST)
From:      Joseph Scott <joseph@randomnetworks.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/48436: [MAINTAINER FIX] editors/e3
Message-ID:  <200302181949.h1IJnC18036214@randomservers.com>

next in thread | raw e-mail | index | archive | help

>Number:         48436
>Category:       ports
>Synopsis:       [MAINTAINER FIX] editors/e3
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 18 12:00:33 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Joseph Scott
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
System: FreeBSD randomservers.com 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Feb 6 22:32:38 PST 2003 user@jail9.johncompanies.com:/usr/src/sys/compile/47 i386


>Description:
[MAINTAINER FIX] editors/e3

This appears to deal the problem mentioned in PR ports/47505.

For compeleteness I've included the response (to PR ports/47505) from
the author of e3.  It appears to be difference between FreeBSD and Linux.

I'm not sure of other issues that this fix my cause, but for now it looks
like the right thing to do (crossing fingers).
---
From kleine@ak.sax.de Tue Feb 18 11:46:35 2003
Date: Tue, 18 Feb 2003 19:26:10 +0100 (MET)
From: Albrecht Kleine <kleine@ak.sax.de>
To: Joseph Scott <joseph@randomnetworks.com>

hi
> 
> On Sat, 15 Feb 2003, Mark Pulford wrote:
> 
> > Hi,
> >
> > Just in case no one has mentioned it, there appears to be a
> > reproduceable bug in e3:
> >
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/47505
> >
> > I thought you might like to know.
> 
> 	The originator of the PR sent me a copy.  I had forwarded it on to
> the author of e3 but I haven't heard anything back since.

1.
=======
Sorry to say: can't really help. 
Have wasted hours of debugging.
The bug is due a problem in freebsd kernel interface.
IMHO after a "pipe" kernel syscall (this is #42) the kernel
should return 2 file descriptors in registers eax and edx.
The libc will write this into an array of 2 integers,
and so e3 does.  
Unfortunately edx is always 0, I consider it as a bug, but
you should know I am a LINUX user and have never 
cared about freebsd.

The e3 code should be:

%ifdef FREEBSD
   mov [sedpipeB0],eax
   mov [sedpipeB1],edx
%endif

But does not work, because edx is 0, always.

So e3's source code has an ugly work around,
works on MY system, (perhaps freebsd 4.4), because
I've found out that the missing value is eax+2.
Ugly, of course, and now it seems to be a false assumption
for other freebsd-systems or kernels.

%ifdef FREEBSD
   mov [sedpipeB0],eax             ;this seems to work, although...
   inc eax                         ;...I don't know why....?
   inc eax                         ;Someone can explain?
   mov [sedpipeB1],eax
%endif


Needless to say, on my LINUX box the e3 code runs well.


2.
======
As work around I am suggesting switching off 
the fork of the 'sed' child process as follows:

Please edit line 18 of e3.h from:

%define USE_PIPE

to  this:

;;;;;; %define USE_PIPE

and rebuild e3.
So the bug won't crash the editor.


3.
======
Maybe someone of your freebsd kernel experts can 
give comments about the results of the a "pipe" kernel 
syscall (#42) ??
With that kind of feedback I'd like to solve the problem.

So please feel free to forward this mail 
to any kind of kernel 'guru' for urgent help needed.


Hope this note helps - at least a little bit 
with the workaround included.
bye
Albrecht
---
>How-To-Repeat:
>Fix:
--- e3.diff begins here ---
diff -ruN e3.orig/files/patch-e3.h e3/files/patch-e3.h
--- e3.orig/files/patch-e3.h	Wed Dec 31 16:00:00 1969
+++ e3/files/patch-e3.h	Tue Feb 18 11:35:45 2003
@@ -0,0 +1,11 @@
+--- e3.h.orig	Tue Feb 18 11:29:31 2003
++++ e3.h	Tue Feb 18 11:30:18 2003
+@@ -15,7 +15,7 @@
+ ;-------
+ %define BEEP_IN_VI			;undef if you hate beeping computers
+ %define USE_MATH			;undef if you don't use the numerics
+-%define USE_PIPE			;undef if you don't use piping through sed/ex
++;;;;;; %define USE_PIPE			;undef if you don't use piping through sed/ex
+ %define USE_BUILTINHELP			;undef if you really don't need help (saves some space)
+ %define USE_UNDO			;undef if there is low memory
+ ;;;%define USE_EXT_MOVE			;smart move mode for Home,End,BOF,EOF keys
--- e3.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302181949.h1IJnC18036214>