HP3000-L Archives

May 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Erik Vistica <[log in to unmask]>
Reply To:
Erik Vistica <[log in to unmask]>
Date:
Wed, 17 May 2000 10:39:03 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
I agree with Tracy's assesment. Just wanted to add that if your buffer
is too small on FREAD, your stack WILL be corrupted. Depending what
lives after your buffer on the stack will affect the symptoms seen. You
may simply overwrite the next variable defined with a possible 'silent'
failure (no indication this has occured). But I've usually seen that you
eventually get a DMPT (Data Memory Protection Trap). It may not occur
immediately but buffers that are too small is one of the most common
ways to cause a DMPT.

Tracy Pierce wrote:
>
> This looks to me like what happens when you try to read a message file which
> is empty.  Issue an fcontrol 45 to make the file act like you wanted in the
> first place?
> Tracy Pierce
>
> > -----Original Message-----
> > From: Born, Ken [mailto:[log in to unmask]]
> > Sent: Wednesday, May 17, 2000 9:07 AM
> > To: [log in to unmask]
> > Subject: END OF FILE error on FREAD
> >
> >
> > Hi Guys,
> > Will the following error be produced if my buffer is too
> > small on my FREAD?
> > read_length := -4106;
> > length_read := fread(almginbd_msgf,in_port_record,read_length);
> >
> > ALMSGH - Unable to Read ALMGINBD.MSGF.CJISII
> > ALMSGH - END OF FILE  (FSERR 0)
> >
> > My message file is:
> > ALMGINBD*        4200B  VAM          0        503   1      256  1  *
> >
> > I don't understand if I am reading 4106 bytes, how do I go
> > past a message
> > file of 4200B?  or could this be another problem I don't know about.
> >

ATOM RSS1 RSS2