diff options
author | Eric Wong <bofh@yhbt.net> | 2023-06-11 21:33:27 +0000 |
---|---|---|
committer | Eric Wong <bofh@yhbt.net> | 2023-06-26 09:16:38 +0000 |
commit | 65b7739431a9cdb98b8f356f5794b3ac81e87705 (patch) | |
tree | 6dcc553021c222c138af70a9ff312518c345b935 /test | |
parent | 09a2f8678e7eddfc604ca7284fec81e278b774bc (diff) | |
download | raindrops-65b7739431a9cdb98b8f356f5794b3ac81e87705.tar.gz |
alloca makes stack usage unpredictable and life difficult for static analysis tools and compilers. The 46 bytes of INET6_ADDRSTRLEN is fine to keep on stack, but page size can be several MB large in some architectures (but typically 4K on common architectures). Thus we handle page size-ed allocations via `rb_str_tmp_new'. `rb_str_tmp_new' has been in public Ruby headers since the 1.9 days and used by the core `zlib', `digest', and `zlib' extensions, so it should be safe to use (and `rb_str_resize' is used in many more C extensions).
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions