Documentation does not mention stack requirements
- Vorherrschende Sprache
- C++
- Sterne
- 4.8k
- Forks
- 694
- Ø Merge
- 12 Std. 48 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
```read``` or ```async_read``` operations may require "large" amounts of stack. The documentation should acknowledge this.
Example: https://github.com/boostorg/beast/blob/ffbe65f4c922e1b8d76e85434d0a8d3ee1c083e9/include/boost/beast/http/impl/basic_parser.ipp#L486
If the parser is used inside of a stackful coroutine, this may easily lead to stack overflow. A coroutine stack size is architecture dependent and the user may choose a size that is smaller than the default(64k IIRC), but the size should be at least ``` SIGSTKSZ```, which happens to be ```8196``` bytes on linux-amd64.
Additional related thing to consider: with split stacks enabled a large stack allocation might not necessarily improve performance over a dynamically allocated buffer.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.