Article View: comp.sys.next.programmer
Article #843comp.unix.programmer
From: Frank Hartlep
Date: Tue, 08 Sep 1992 14:07
Date: Tue, 08 Sep 1992 14:07
47 lines
2116 bytes
2116 bytes
(Excuses if this message appears repeatedly but my newsreader isn't
getting my first two postings.)
... although they do on a NeXT.
Perhaps somebody can see an error in this code.
.
.
.
BufferSize += 50000;
Buffer = malloc (BufferSize);
Offset = strlen (ARCHIVED) + strlen (Description) + 1 + 4;
sprintf (Buffer, ARCHIVED "%s", Description);
xdrmem_create (&Stream, Buffer + Offset, BufferSize - Offset, XDR_ENCODE);
.
.
.
(in another function)
if (Stream->x_op == XDR_ENCODE) {
if (*Pointer != NULL) {
if (! xdr_bool (Stream, &NonNil)) <=== Bus error
return -1;
Next = 0;
if (DescriptionLoop (
Stream, Description, Descriptor, Pointer, &Next)
== -1)
return -1;
}
.
.
.
Some more info:
1. The xdr_bool does the first write to the XDR stream, so it's very
probable that something's wrong with the stream.
2. The malloc for Buffer was ok, there should be enough memory for
the stream.
3. The Stream and NonNil variables seem to be ok, too.
I'm totally clueless. The routines have been heavily used on a NeXT without
any problem, but on a Sun4 (and IPX) they never make it beyond that point.
Any ideas are greatly apreciated.
Frank
Technical Details
Message-ID:
<KOT6WBG@mailgzrz.tu-berlin.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!zrz.tu-berlin.de!opal.cs.tu-berlin.de!mauritiShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!zrz.tu-berlin.de!opal.cs.tu-berlin.de!mauriti From: mauriti@cs.tu-berlin.de (Frank Hartlep) Subject: comp.unix.programmer Message-ID: <KOT6WBG@mailgzrz.tu-berlin.de> Sender: news@mailgzrz.tu-berlin.de (News Manager) Nntp-Posting-Host: hivehom.cs.tu-berlin.de Organization: Technical University of Berlin, Germany Date: Tue, 8 Sep 1992 14:07:12 GMT Lines: 47