[comp.sys.ncr] bugs on s486 SysVr4

beihl@cadillac.cad.mcc.com (06/06/91)

On an S486 system running System V release 4.0.2.0, I have encountered
a few problems on an otherwise quite nice machine/system.  Perhaps
others who have bumped into these might be interested:

(1) setjmp() is broken!  The following program dumps core:

#include <setjmp.h>
jmp_buf jb;
main() {
  if (!setjmp(jb)) sub();
  else printf("returned from longjmp\n");
}

sub() {
printf("in sub\n");
longjmp(jb,1);
}

As a workaround, here is a replacement setjmp.s:

begin 644 setjmp.s.Z
M'YV0"5R82<.F# @1<\K04=,&CHLY(A0$I%,&#QV)+LZP>2.&38*$"QMB#,,F
MS1DW"6@H ,D0C@Z)<.K,0>.1! P\,&#*I)G@)@X4)<K,@9,"A-$7(%I^$5/'
MC,26 9G4D(A1(T>/7UB*#$C2)$J5616V?)D@YLR:-V/H/-L3S\^@0XL>3=IP
M:=.G#:-.K;JQ(X@Y)K7"&5GR) B5@,\()FN6IT^@0HFN=>P6<EP%+J22;?/&
MCL>;,"P391$T#!ZC() J9>HT 6?/"6SBB6&&!633<E$CK3/FBQDV811/]E@:
MS_#8H(\7E_@:+1X;-$B7,3WWC,(O8]ZXH6A1(ILQ))W?8"$[9X(P9,@XAS%&
M^E#FG3_C%)U".O74=.'8;3VFX7H6-]% WUR)N4$2"&V$,<<:/SSE1AE1J72>
M&^HAAX<9&&9H1AFV%2<74G34(8<;(+R!X5]>'9C@@I@Q00-9!9'4E@P">B@=
M&:>AAI\<92BF$'RPE0?#D$3& " >,HP!&8X?@E!$$%B T ,(:KD67UMO159?
M<3HBQ6.((X* 'AD\SC$'"$ 2-QT>1\Z0)9/>32=?:'"-MIR5L!5W) TUEL&D
M;B!44<044$B$QQMRJ&F:?<:=EYYS.+@W6 )?*L#752!LY,89+1'FU6$*:,II
M0XSM)%^6<>DXUY<BDF@'2764<=QC=>8&Z&IW)0 >&U@E)FJGCE8H6Z1U2E3I
MI7YE9=*O6[G0E6%@^:K=J"XI5X88DS:70)W282O1''5T9"&QD5D+F+5B-+JK
M1YG)T*(,C+T!AYKI2C3F>D/&( ,9M'7;J+:T7FNG4&E(U-^\%@YY)'N089O"
M4Q!F5J6V<*7!:)IM,1R4PS?^>V50.!Y9 YUK/BRQ#@F8F\:M=;%F<'@)A$5'
M=MM5=%%9\JHY1J-PY+SMM3S[7'&<8=@A*Z4_(MNK0C1S=[.SA9$8+=/:.?W2
M"S@C#'*..RK4JICIE3D'3$+[R;5J+>?:V'I5KOTSCGC!$=4,+<ZPV96R0<?H
M7%-D,05V5=O\5QYS4-0&".MZMZZ%XY5'MM9F8[SUPB1?AK4:8NA:AAQR(&IL
!TE-D

end

(2) readdir() is broken.  The following program prints garbage
instead of directory entry names.

#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>

struct dirent *dp;
DIR *thedir;

main() {
  unsigned char *cp;
  int i;
  thedir = opendir(".");
  while (dp = readdir(thedir)) {
    printf("name is %s\n",dp->d_name);
  }
}

The workaround for this is to use Doug Gwyn's dir-lib package
(vol 9. comp.sources.unix with a patch in vol 10).  I needed
to do this to get gnumake built properly.

(3)  The following file will hang the Csh when sourced:

#! /bin/csh -f
#
echo $path | grep -s "/usr/ucb/bin"
exit $status

Workaround is to say 

echo $path > tmp$$; grep -s "/usr/ucb/bin" tmp$$

instead.


Gary Beihl (beihl@mcc.com)

rns@tortuga.SanDiego.NCR.COM (Rick Schubert) (06/07/91)

In article <21112@cadillac.CAD.MCC.COM> beihl@cadillac.cad.mcc.com () writes:
>On an S486 system running System V release 4.0.2.0, I have encountered
>a few problems on an otherwise quite nice machine/system.  Perhaps
>others who have bumped into these might be interested:

>(1) setjmp() is broken!  The following program dumps core:

[Program deleted]

I compiled and ran it on an NCR 3345 (I think) running 4.0.2.0, and it
ran successfully.

>As a workaround, here is a replacement setjmp.s:

I ran this through uudecode and got the message "Short file."  After
uncompressing the resulting file, the resulting setjmp.s had some
garbage in it.

>(2) readdir() is broken.  The following program prints garbage
>instead of directory entry names.

[Program deleted]

The program worked fine for me.

>(3)  The following file will hang the Csh when sourced:

>#! /bin/csh -f
>#
>echo $path | grep -s "/usr/ucb/bin"
>exit $status

>Workaround is to say 

>echo $path > tmp$$; grep -s "/usr/ucb/bin" tmp$$

I have encountered similar problems.  The general problem seems to
be piping a csh built-in command into some process.  "echo", "set", and
"history" (and probably others) all suffer from this problem.  The
commands don't have to be in a file that is source-d; they can be
entered directly from the keyboard.  And interrupting seems to be
impossible.  I always have to log in again somewhere else and kill one
of the processes that are hung.

In the case of "echo", an each workaround is to use "/bin/echo,"
which is a real, live program (as opposed to a shell built-in),
so it doesn't suffer from this bug.

Disclaimer: I work for NCR but have nothing to do with the products
involved.

-- Rick Schubert (rns@tortuga.SanDiego.NCR.COM)

wescott@nncrcae.Columbia.NCR.COM (06/08/91)

In article <21112@cadillac.CAD.MCC.COM> beihl@cadillac.cad.mcc.com () writes:
> On an S486 system running System V release 4.0.2.0, I have encountered
> a few problems on an otherwise quite nice machine/system. 

You don't mention vendor (I assume it's an NCR box) or the specific release.
I have a prerelease of 1.01.00.

> (1) setjmp() is broken!  The following program dumps core:

Seems to be fixed on my system.

> (2) readdir() is broken.  The following program prints garbage
> instead of directory entry names.

Also fixed.

> (3)  The following file will hang the Csh when sourced:
> #! /bin/csh -f
> #
> echo $path | grep -s "/usr/ucb/bin"
> exit $status

Piping anything out of echo seems to hang csh. It's been SPEC'd.
(SPEC is an unfortunate acronym for a problem reporting system, it means
that it has been recorded and will be investigated).
-- 
	-Mike Wescott
	mike.wescott@ColumbiaSC.NCR.COM