[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recv buf and EFAULT



On Wednesday, July 24, 2002, at 07:34  PM, Andy Fripp wrote:

> Hi,
>
> I have a program that uses "recv".
> The buffer size is 64000 bytes and
> the buffer is allocated on the stack.
> I get an EFAULT error.
>
> If I change the buffer to be heap allocated
> (malloc) the problem goes away. Similarly, if
> I reduce the stack allocated buffer to
> be 4000 bytes it works too.
>
> The original version worked fine on
> Linux, AIX, HP-UX, Solaris etc - why
> not on OpenBSD ?
>
> Am I missing something obvious ?

I'd say the readers of this list are missing some obvious things, like:

- A code snippet containing the offending code.
- Even better: a little program isolating the problem.
- the output of uname -a
- etc

>
> Thanks
>
> Andy

Cheers, Otto