* 4.2.0-pre-4 @ 2004-03-12 17:23 Peter Stephenson 2004-03-12 18:58 ` 4.2.0-pre-4 Peter Stephenson 2004-04-12 1:38 ` zle_thingy.c: variable "modsave" used before its value set Jens Petersen 0 siblings, 2 replies; 8+ messages in thread From: Peter Stephenson @ 2004-03-12 17:23 UTC (permalink / raw) To: Zsh users list I've uploaded 4.2.0-pre-4 to ftp.zsh.org. Oliver has got HP-UX 11 working with help from Paul Ackersviller. This may not be quite the end of that saga, but I wanted to get something out before the weekend. The zpty module is still not working, although it might now be something quite simple. For AIX we need to make sure any functions needed in libraries have `mod_export' in front... Ibraheem Umaru-Mohammed has been providing information on failures; there's an extra symbol this time. There may be more missing, however. It ought to be possible to use `nm' on some other system to verify the symbols that need exporting, and hence keep the list up to date, but I don't think I'm going to have time for that. With a bit of perl this shouldn't be too hard a project. -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 4.2.0-pre-4 2004-03-12 17:23 4.2.0-pre-4 Peter Stephenson @ 2004-03-12 18:58 ` Peter Stephenson 2004-03-15 11:30 ` 4.2.0-pre-4 Ibraheem Umaru-Mohammed 2004-04-12 1:38 ` zle_thingy.c: variable "modsave" used before its value set Jens Petersen 1 sibling, 1 reply; 8+ messages in thread From: Peter Stephenson @ 2004-03-12 18:58 UTC (permalink / raw) To: Zsh users list Peter Stephenson wrote: > It ought to be possible to use `nm' on some other system to verify the > symbols that need exporting, and hence keep the list up to date, but I > don't think I'm going to have time for that. I lied. Should have waited to release 4.2.0-pre-4. This patch (the first two hunks) will probably be needed on AIX. Sent to zsh-users in case it affects anybody downloading that. (I'm assuming that stdout@@GLIBC_2.0 don't need exporting...) Index: Src/Zle/zle_misc.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_misc.c,v retrieving revision 1.10 diff -u -r1.10 zle_misc.c --- Src/Zle/zle_misc.c 8 Mar 2004 11:44:14 -0000 1.10 +++ Src/Zle/zle_misc.c 12 Mar 2004 18:40:07 -0000 @@ -73,7 +73,7 @@ } /**/ -int +mod_export int selfinsertunmeta(char **args) { lastchar &= 0x7f; Index: Src/Zle/zle_utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_utils.c,v retrieving revision 1.8 diff -u -r1.8 zle_utils.c --- Src/Zle/zle_utils.c 29 Oct 2003 19:17:48 -0000 1.8 +++ Src/Zle/zle_utils.c 12 Mar 2004 18:40:07 -0000 @@ -388,7 +388,7 @@ * The message must be metafied. */ /**/ -void mod_export +mod_export void showmsg(char const *msg) { char const *p; Index: Util/check_exports =================================================================== RCS file: Util/check_exports diff -N Util/check_exports --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Util/check_exports 12 Mar 2004 18:40:07 -0000 @@ -0,0 +1,64 @@ +#!/usr/local/bin/perl -w + +# Attempt to scan executable, libraries, and .export files after +# a zsh build to see if all necessary symbols appear in the .export file +# (and hence with `mod_export' in the source file). This keeps AIX happy. +# Probably severely system dependent, but known to run on Fedora Core 1, +# at least. Not needed on AIX itself... you can tell if doesn't link. + +if (! -f "zsh") { + die "Can't file zsh, are we in the Src directory of the build?\n"; +} + +my (%defined, %undefined, %exported); + +foreach my $file ("zsh", glob("*.so */*.so")) { + next unless -f $file; + + my $exports = $file; + $exports =~ s/\.so//; + $exports .= ".export"; + if (-f $exports) { + open EXPORT, $exports or die "Can't read $exports: $!\n"; + my $href = $exported{$file} = { }; + while (<EXPORT>) { + next if /^#/; + chomp; + $href->{$_} = 1; + } + close EXPORT; + } else { + warn "Hmmm... no .exports file for $file\n"; + } + + open PIPE, "nm $file |" or die "Can't popen nm"; + while (<PIPE>) { + s/^[0-9a-f]*\s+//; + my ($type, $sym) = split; + # ignore local symbols (lower case) + if ($type =~ /^[TBAD]/) { + if (!defined $defined{$sym}) { + $defined{$sym} = $file; + } + } elsif ($type eq 'U') { + # could skip undefined from zsh and zsh.so, but what the heck + my $ref = \$undefined{$sym}; + if (defined $$ref) { + push @$$ref, $file; + } else { + $$ref = [ $file ]; + } + } + } + close PIPE or die "nm failed"; +} + +foreach $sym (keys %undefined) { + my $deffile = $defined{$sym}; + if (defined $deffile) { + if (!$exported{$deffile}{$sym}) { + printf "%-20s: %-20s: %s\n", $sym, $defined{$sym}, + join(" ", @{$undefined{$sym}}); + } + } +} -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 4.2.0-pre-4 2004-03-12 18:58 ` 4.2.0-pre-4 Peter Stephenson @ 2004-03-15 11:30 ` Ibraheem Umaru-Mohammed 2004-03-15 16:20 ` 4.2.0-pre-4 Peter Stephenson 0 siblings, 1 reply; 8+ messages in thread From: Ibraheem Umaru-Mohammed @ 2004-03-15 11:30 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh users list On Fri, 2004-03-12 at 18:58, Peter Stephenson wrote: > Peter Stephenson wrote: > > It ought to be possible to use `nm' on some other system to verify the > > symbols that need exporting, and hence keep the list up to date, but I > > don't think I'm going to have time for that. > > I lied. Should have waited to release 4.2.0-pre-4. This patch (the > first two hunks) will probably be needed on AIX. Sent to zsh-users in > case it affects anybody downloading that. > > (I'm assuming that stdout@@GLIBC_2.0 don't need exporting...) > > Index: Src/Zle/zle_misc.c > =================================================================== > RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_misc.c,v > retrieving revision 1.10 > diff -u -r1.10 zle_misc.c > --- Src/Zle/zle_misc.c 8 Mar 2004 11:44:14 -0000 1.10 > +++ Src/Zle/zle_misc.c 12 Mar 2004 18:40:07 -0000 > @@ -73,7 +73,7 @@ > } > > /**/ > -int > +mod_export int > selfinsertunmeta(char **args) > { > lastchar &= 0x7f; > Index: Src/Zle/zle_utils.c > =================================================================== > RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_utils.c,v > retrieving revision 1.8 > diff -u -r1.8 zle_utils.c > --- Src/Zle/zle_utils.c 29 Oct 2003 19:17:48 -0000 1.8 > +++ Src/Zle/zle_utils.c 12 Mar 2004 18:40:07 -0000 > @@ -388,7 +388,7 @@ > * The message must be metafied. */ > > /**/ > -void mod_export > +mod_export void > showmsg(char const *msg) > { > char const *p; > Index: Util/check_exports > =================================================================== > RCS file: Util/check_exports > diff -N Util/check_exports > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ Util/check_exports 12 Mar 2004 18:40:07 -0000 > @@ -0,0 +1,64 @@ > +#!/usr/local/bin/perl -w > + > +# Attempt to scan executable, libraries, and .export files after > +# a zsh build to see if all necessary symbols appear in the .export file > +# (and hence with `mod_export' in the source file). This keeps AIX happy. > +# Probably severely system dependent, but known to run on Fedora Core 1, > +# at least. Not needed on AIX itself... you can tell if doesn't link. > + > +if (! -f "zsh") { > + die "Can't file zsh, are we in the Src directory of the build?\n"; > +} > + > +my (%defined, %undefined, %exported); > + > +foreach my $file ("zsh", glob("*.so */*.so")) { > + next unless -f $file; > + > + my $exports = $file; > + $exports =~ s/\.so//; > + $exports .= ".export"; > + if (-f $exports) { > + open EXPORT, $exports or die "Can't read $exports: $!\n"; > + my $href = $exported{$file} = { }; > + while (<EXPORT>) { > + next if /^#/; > + chomp; > + $href->{$_} = 1; > + } > + close EXPORT; > + } else { > + warn "Hmmm... no .exports file for $file\n"; > + } > + > + open PIPE, "nm $file |" or die "Can't popen nm"; > + while (<PIPE>) { > + s/^[0-9a-f]*\s+//; > + my ($type, $sym) = split; > + # ignore local symbols (lower case) > + if ($type =~ /^[TBAD]/) { > + if (!defined $defined{$sym}) { > + $defined{$sym} = $file; > + } > + } elsif ($type eq 'U') { > + # could skip undefined from zsh and zsh.so, but what the heck > + my $ref = \$undefined{$sym}; > + if (defined $$ref) { > + push @$$ref, $file; > + } else { > + $$ref = [ $file ]; > + } > + } > + } > + close PIPE or die "nm failed"; > +} > + > +foreach $sym (keys %undefined) { > + my $deffile = $defined{$sym}; > + if (defined $deffile) { > + if (!$exported{$deffile}{$sym}) { > + printf "%-20s: %-20s: %s\n", $sym, $defined{$sym}, > + join(" ", @{$undefined{$sym}}); > + } > + } > +} Peter, It has all finally compiled on AIX 5.2, and all seems to work correctly. Thanks for taking the time to look at this - much appreciated. Cheers, --ibraheem. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 4.2.0-pre-4 2004-03-15 11:30 ` 4.2.0-pre-4 Ibraheem Umaru-Mohammed @ 2004-03-15 16:20 ` Peter Stephenson 0 siblings, 0 replies; 8+ messages in thread From: Peter Stephenson @ 2004-03-15 16:20 UTC (permalink / raw) To: Zsh users list Ibraheem Umaru-Mohammed wrote: > It has all finally compiled on AIX 5.2, and all seems to work correctly. > Thanks for taking the time to look at this - much appreciated. This is good, thanks for testing... as far as I know zsh compiles everywhere (for suitable values of `everywhere'), though with a few remaining zpty problems. It would be nice to fix those, but it's not a top priority any more... I will release 4.2.0 on Friday anyway, unless something major turns up. -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ^ permalink raw reply [flat|nested] 8+ messages in thread
* zle_thingy.c: variable "modsave" used before its value set 2004-03-12 17:23 4.2.0-pre-4 Peter Stephenson 2004-03-12 18:58 ` 4.2.0-pre-4 Peter Stephenson @ 2004-04-12 1:38 ` Jens Petersen 2004-04-12 9:04 ` Wayne Davison 1 sibling, 1 reply; 8+ messages in thread From: Jens Petersen @ 2004-04-12 1:38 UTC (permalink / raw) To: Zsh users list; +Cc: d.binderman Hi, I received a bug report that the local variable `modsave' is used uninitialised in bin_zle_call() (zle_thingy.c). https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=116561 Is this something not worth losing any sleep over, or what should it be initialised too? Jens ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zle_thingy.c: variable "modsave" used before its value set 2004-04-12 1:38 ` zle_thingy.c: variable "modsave" used before its value set Jens Petersen @ 2004-04-12 9:04 ` Wayne Davison 2004-04-12 15:21 ` Bart Schaefer 0 siblings, 1 reply; 8+ messages in thread From: Wayne Davison @ 2004-04-12 9:04 UTC (permalink / raw) To: Jens Petersen; +Cc: Zsh users list, d.binderman [-- Attachment #1: Type: text/plain, Size: 525 bytes --] On Mon, Apr 12, 2004 at 10:38:00AM +0900, Jens Petersen wrote: > I received a bug report that the local variable `modsave' is > used uninitialised in bin_zle_call() (zle_thingy.c). The variable can't actually be used uninitialized -- the compiler just thinks it can. If we want to get rid of the warning, I'd recommend making the struct static rather than initializing it to an unneeded value on every call. Here's a patch that does this, plus it gets rid of some unneeded cleanup code that can't get triggered. ..wayne.. [-- Attachment #2: modsave.patch --] [-- Type: text/plain, Size: 496 bytes --] --- Src/Zle/zle_thingy.c 12 Dec 2003 22:53:28 -0000 1.12 +++ Src/Zle/zle_thingy.c 12 Apr 2004 08:40:04 -0000 @@ -622,13 +622,11 @@ static int bin_zle_call(char *name, char **args, Options ops, char func) { Thingy t; - struct modifier modsave; + static struct modifier modsave; int ret, saveflag = 0; char *wname = *args++; if (!wname) { - if (saveflag) - zmod = modsave; return (!zleactive || incompctlfunc || incompfunc || sfcontext != SFC_WIDGET); } ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zle_thingy.c: variable "modsave" used before its value set 2004-04-12 9:04 ` Wayne Davison @ 2004-04-12 15:21 ` Bart Schaefer 2004-04-12 16:22 ` Wayne Davison 0 siblings, 1 reply; 8+ messages in thread From: Bart Schaefer @ 2004-04-12 15:21 UTC (permalink / raw) To: Zsh users list On Apr 12, 2:04am, Wayne Davison wrote: > > The variable can't actually be used uninitialized -- the compiler just > thinks it can. > > If we want to get rid of the warning, I'd recommend making the struct > static rather than initializing it to an unneeded value on every call. Are you really sure that bin_zle_call() is not re-entrant? Seems to me that the whole point of modsave is that it is a stack variable. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zle_thingy.c: variable "modsave" used before its value set 2004-04-12 15:21 ` Bart Schaefer @ 2004-04-12 16:22 ` Wayne Davison 0 siblings, 0 replies; 8+ messages in thread From: Wayne Davison @ 2004-04-12 16:22 UTC (permalink / raw) To: Bart Schaefer; +Cc: Zsh users list On Mon, Apr 12, 2004 at 08:21:20AM -0700, Bart Schaefer wrote: > Are you really sure that bin_zle_call() is not re-entrant? No, I'm not, so that static idea wouldn't work. The useless cleanup code could be safely removed, though, if desired. ..wayne.. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-04-12 16:22 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-03-12 17:23 4.2.0-pre-4 Peter Stephenson 2004-03-12 18:58 ` 4.2.0-pre-4 Peter Stephenson 2004-03-15 11:30 ` 4.2.0-pre-4 Ibraheem Umaru-Mohammed 2004-03-15 16:20 ` 4.2.0-pre-4 Peter Stephenson 2004-04-12 1:38 ` zle_thingy.c: variable "modsave" used before its value set Jens Petersen 2004-04-12 9:04 ` Wayne Davison 2004-04-12 15:21 ` Bart Schaefer 2004-04-12 16:22 ` Wayne Davison
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).