zsh-workers
 help / color / mirror / code / Atom feed
* URGENT: Please, backout change (Re: zsh-3.1.4 released)
@ 1998-06-01 10:44 Andrej Borsenkow
  1998-06-01 11:03 ` Zefram
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 1998-06-01 10:44 UTC (permalink / raw)
  To: Zefram, zsh-announce


Because I am responsible for this change, I request to backout it:

Mon May 25 21:13:41 1998  Andrew Main  <zefram@zsh.org>

 * Src/mkmakemod.sh, configure.in, aczsh.m4: Link modules against
   $(LIBS), and include -lc in $(LIBS), in case a module requires
   a function that only exists in static libraries.


It breaks environment in ZSH. It happens as following:

as said, our systems have two libc - dynamic libc.so.1 and static libc.so
(yes, it *is* ar lib, but called so :) Unfortunately, _environ is located in
static libc. If I try to link shared libray, which is using _environ, with
libc, the following happens:

  the code in libzsh gets its own static copy of _environ
  startup code in zsh is linked with it's own static copy of _environ
  which results in every copy of ZSH starting with blank (at the best)
environment pointer.

This problem is not specific to ZSH - every now and then it comes up e.g.
with Perl, or any software, which is using shared libs.

Unfortunately, there is no clean way to autoconf it. Dynamic loading runs on
MIPS line (Reliant UNIX) without this change; it is possible to make it
running on Intel line (SINIX-L/SINIX-M) but with many eforts (actually, only
one module has to be linked with -lc) ... I personally would simply disallow
dynamic loading on i386-sni-sysv4 - or at least to put it in NEWS or FAQ.

Thank you

A. Borsenkow


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: URGENT: Please, backout change (Re: zsh-3.1.4 released)
  1998-06-01 10:44 URGENT: Please, backout change (Re: zsh-3.1.4 released) Andrej Borsenkow
@ 1998-06-01 11:03 ` Zefram
  0 siblings, 0 replies; 2+ messages in thread
From: Zefram @ 1998-06-01 11:03 UTC (permalink / raw)
  To: Andrej Borsenkow; +Cc: zsh-workers

Andrej Borsenkow wrote:
>  the code in libzsh gets its own static copy of _environ
>  startup code in zsh is linked with it's own static copy of _environ
>  which results in every copy of ZSH starting with blank (at the best)
>environment pointer.

Hmmmm.

We need to link modules against $LIBS for other reasons too (it's the
only way to being in the right libraries in some cases), so we can't
really back that out.  It seems that this is a problem where static
modifiable library data (such as environ) appears only in statically
linked libraries.  My feeling is that this arrangement of libraries
means that shared libraries are hopelessly broken, so we shouldn't try
to cater for these systems (not that we reasonably can).

>Unfortunately, there is no clean way to autoconf it.

We can, but only for specific symbols.  All we need is to compile an
executable and library with references to environ, load them both, and
compare the environ pointers.  If they differ, then shared libraries
are broken.  Do this for all symbols that are a problem on any system.

Until someone writes this autoconf test, just don't use --enable-dynamic
on systems that exhibit this lossage.

-zefram


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-06-01 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-01 10:44 URGENT: Please, backout change (Re: zsh-3.1.4 released) Andrej Borsenkow
1998-06-01 11:03 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).