Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Matthew Mondor
On Mon, 29 Nov 2021 00:05:18 +0100 Anthony Mallet wrote: > > Why should there be any particular minimum? It seems to me it > > depends on what the thread is doing (though one page, whatever that > > is on the hardware and release in question, is probably a pretty > > hard minimum). > > That's

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Mouse wrote in <202111292115.qaa06...@stone.rodents-montreal.org>: |> * The maximum is 65000. | |It probably is actually 65535, or 65495, or some such; if there is a |limit that is actually 65000, it strikes me as unlikely to be anything |but someone imposing an artificial round-human

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Mouse
> * The maximum is 65000. It probably is actually 65535, or 65495, or some such; if there is a limit that is actually 65000, it strikes me as unlikely to be anything but someone imposing an artificial round-human-number limit. /~\ The ASCII Mouse \ / Ribbon Cam

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Joerg Sonnenberger wrote in : |On Mon, Nov 29, 2021 at 06:31:30PM +0100, Steffen Nurpmeso wrote: |> Joerg Sonnenberger wrote in |> : |>|On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: |>|> DNS queries (via UDP) are limited to max 512, as that is what the |>|> protocol always req

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Joerg Sonnenberger
On Mon, Nov 29, 2021 at 06:31:30PM +0100, Steffen Nurpmeso wrote: > Joerg Sonnenberger wrote in > : > |On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: > |> DNS queries (via UDP) are limited to max 512, as that is what the > |> protocol always required, so can be handled by everythin

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Joerg Sonnenberger wrote in : |On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: |> DNS queries (via UDP) are limited to max 512, as that is what the |> protocol always required, so can be handled by everything (or should be). | |Strictly speaking, it is the minimum MTU every IPv4 i

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20211129173130.b55ba%stef...@sdaoden.eu>: |Joerg Sonnenberger wrote in | : ||On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: ||> DNS queries (via UDP) are limited to max 512, as that is what the ||> protocol always required, so can be handled by everythi

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Joerg Sonnenberger
On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: > DNS queries (via UDP) are limited to max 512, as that is what the > protocol always required, so can be handled by everything (or should be). Strictly speaking, it is the minimum MTU every IPv4 implementation is supposed to allow. IPv6

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Anthony Mallet
On Monday 29 Nov 2021, at 20:38, Robert Elz wrote: > | In addition, I just noticed that res_nquery(3) in > | libc/resolv/res_query.c uses a similar buffer but of size > | min(PACKETSZ, 1024). PACKETSZ seems to be 512 bytes only. > > That is as it shoukd be. > PR tge huge stack array if yiu wa

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Robert Elz
Date:Mon, 29 Nov 2021 12:25:24 +0100 From:Anthony Mallet Message-ID: <24996.47268.358308.412...@gargle.gargle.howl> | In addition, I just noticed that res_nquery(3) in | libc/resolv/res_query.c uses a similar buffer but of size | min(PACKETSZ, 1024). PACKETSZ se

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Anthony Mallet
On Monday 29 Nov 2021, at 00:05, Anthony Mallet wrote: > 64k is not small, so I still believe it should be on the heap. In addition, I just noticed that res_nquery(3) in libc/resolv/res_query.c uses a similar buffer but of size min(PACKETSZ, 1024). PACKETSZ seems to be 512 bytes only. So it seems