List:General Discussion« Previous MessageNext Message »
From:Per Jessen Date:August 8 2012 4:11pm
Subject: RE: UDF writing to unix socket - segfaults?
View as plain text  
Martin Gainty wrote:

> this is pure speculation unless we can get ahold of the source code
> for your specific version of glibc and determine what the maximum
> sizes are .. otherwise anything I suggest would be speculative..lets
> take a look at
>
http://fossies.org/dox/glibc-2.16.0/sysdeps_2mach_2hurd_2sendto_8c_source.html
> 
> ssize_t
>    29 __sendto (int fd,
>    30           const void *buf,
>    31           size_t n,
>    32           int flags,
>    33           const struct sockaddr_un *addr,
>    34           socklen_t addr_len)
> Here his maximum buffer length for sending is unsigned int
> specifically size_t so..
> are both send and receive entities IPv4 or both entities are IPv6
> if thats the case..
> can you send
> 0 Bytes
> 2 bytes
> 4 bytes
> 8 bytes
> at what maximum length of buffer does the segfault occur
> ?

Interesting that you should pick on the length - I think that might be
it.  When I switched to using a UDP socket, sendto() did complain about
the length.  (error 90, message too long).  Hmm, that's probably a UDP
packet-size restriction, whereas no such restriction exist for a unix
socket (I presume).  Thanks for the idea!


-- 
Per Jessen, Zürich (24.4°C)

Thread
UDF writing to unix socket - segfaults?Per Jessen8 Aug
  • RE: UDF writing to unix socket - segfaults?Martin Gainty8 Aug
  • RE: UDF writing to unix socket - segfaults?Per Jessen8 Aug
    • RE: UDF writing to unix socket - segfaults?Martin Gainty8 Aug
  • RE: UDF writing to unix socket - segfaults?Per Jessen8 Aug