Age | Commit message (Collapse) | Author | Files | Lines |
|
their time compiling, and 50% spinning in shell scripts. If you'd rather
spend your power bill on useful gcc cycles though, you might desire to use a
different shell for running build scripts - like pdksh, which is conveniently
available at bootstrap time.
But what if pdksh does this to you?
pdksh -c 'f=`pdksh -c set | wc -l`; f=$((f+1)); while ((f < 100000)); do f=$((f+1)); eval "v_${f}=0"; echo "$f"; done'|tail -1
13106
segmentation fault (core dumped) pdksh -c
Well that's annoying, isn't it.
% echo $(((13106*10+7)/8))
16383
... that's a magical number. Coincidence? Well, no.
tp->nfree = 8*nsize/10; /* table can get 80% full */
This particularly ugly overflow happens because tp->size is a short. When
texpand() does:
p = &ntblp[hash(tblp->name) & (tp->size-1)];
tp->size-1 will, given enough variables (80% of 2^15), type coerce into a
sign-extended 32-bit value of:
info registers $ecx
ecx 0xffff7fff -32769
That hash() function does more or less what you guess, it's a 32 bit unsigned
value. The chances of the final pointer pointing inside the valid allocated
block of memory are very low indeed.
The least-change solution is to change tp->size to a 32 bit value. I've left
it signed because that matches, for example, the size parameter passed to
texpand(). But really this code would be more correct with a liberal
sprinkling of "unsigned", and perhaps a bit of "size_t".
This change allows ffmpeg's configure script, as interpreted by pdksh, to
produce more usable output than a core file.
Bump PKGREVISION for code change.
|
|
|
|
|
|
siglist.sh 1.9: Solaris 7 sort(1) issue with missing whitespace between
option and parameter
lex.c 1.14: C99ish inlined variable declaration
|
|
etcutils to update /etc/shells.
|
|
pdksh is so messy.
|
|
|
|
c_ulimit.c 1.9: avoid sign extension problem
lex.c 1.13: bugfix related to nested quotes
Bump PKGREVISION.
|
|
bulk builds.
|
|
- Define __UNCONST in sh.h instead of on the command line to fix build
issue with !latest Sun Studio.
|
|
|
|
PDKSH-5_2_14 and NetBSD-current HEAD as of 2008-05-31.
- Fixes rare segfault seen on Solaris.
- add strlcpy and strlcat fallback implementations from libnbcompat
- regenerate configure (using autoconf-2.12, ugh)
|
|
- Add DESTDIR support.
|
|
|
|
Only the files required to build it, for pkgsrc bootstrap purposes.
|
|
|
|
in DNS. Mentioned by Zafer Aydogan in PR pkg/37321.
|
|
automatically detects whether we want the pkginstall machinery to be
used by the package Makefile.
|
|
|
|
|
|
one doesn't exist. From now on, we only add the listed PKG_SHELL to
the /etc/shells file if it already exists. This fixes PR pkg/27162.
|
|
+SHELL.
* Turn PKG_REGISTER_SHELLS into a variable that can be set in the shell
environment so that admins can make a choice when installing from
binary packages.
* PKG_SHELL is now a list of paths, and if the path is relative, then it
is taken to be relative to ${PREFIX}. Convert packages that set
PKG_SHELL to take advantage of this new feature by changing the full
paths to the shells into relative paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
have it be automatically included by bsd.pkg.mk if USE_PKGINSTALL is set
to "YES". This enforces the requirement that bsd.pkg.install.mk be
included at the end of a package Makefile. Idea suggested by Julio M.
Merino Vidal <jmmv at menta.net>.
|
|
as this isn't really the real Korn shell, and "pdksh" is a more accurate
name for it. Also don't use buildlink2 so that this shell may be used to
bootstrap buildlink2.
|
|
PD-ksh is a mostly complete AT&T ksh look-alike. Work is mostly
finished to make it fully compatible with both POSIX and AT&T ksh
(when the two don't conflict). Since pdksh is free and compiles
and runs on most common unix systems, it is very useful in creating
a consistent user interface across multiple machines.
|