Memory leak in function with local array

2021-05-02 Thread Thomas.Grenman
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs

Why does "mapfile -d delim" (delim != '\n') use unbuffered read?

2021-05-02 Thread Koichi Murase
Maybe I'm asking a stupid question, but, as in the subject, why does the builtin "mapfile -d delim" use unbuffered read when delim != '\n'? Can we use buffered read for seekable file descriptors the same as the `delim == '\n'' case? Background: `mapfile' can efficiently read entries delimited by