Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Problems using recv with dynamically mallocd mem (Alpha OSF)
@ 1993-06-29 13:33 John Phelps
  0 siblings, 0 replies; only message in thread
From: John Phelps @ 1993-06-29 13:33 UTC (permalink / raw)


	I know that *SOMEBODY* has tried this out there ...

	I've got a socket server program that allows us to write
clients that can communicate with each other via messages based on
content tags at the beginning of each message. Since each message is
variable length, the socket server program must peek at the header
of each message and then malloc a buffer of the specified size to
recv directly into.

	Well guess what ! I can't get the @$%*#$*& thing to work
on the Alpha. It currently executes (properly) on SunOS and Ultrix
and *ALMOST* works on the Alpha. By almost I mean connections are
made, clients think they're transmitting packets, the server attempts
to route null packet, but I cannot get the recv call to actually read
data into the malloced buffer. The error I'm being returned is:

  [EFAULT]  The data was directed to be received into a nonexistent or pro-
            tected part of the process address space.  The buffer parameter
            is invalid.


	Is there some parameter I'm missing when calling the malloc
routines or should I be building with the BSD compatibility libs instead
of the standard C lib functions ? BTW, I *KNOW* that I own the data
buffer returned by the malloc function because of information I
store in the header and trailer of each message buffer.

	Any help or a simple, "Look moron *smack* ....", will suffice.
Not having gdb and not realizing dbx needs money thrown at it before it'll
work has been a hinderance, but we're getting there. Thanks.

--
John Phelps, jbp@ddsdx2.jhuapl.edu OR jbp@raven.jhuapl.edu


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-06-29 13:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-06-29 13:33 Problems using recv with dynamically mallocd mem (Alpha OSF) John Phelps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox