gstreamer/plugins
Sebastian Dröge c15f1b2bec fdsink/filesink: Refactor writev() code to prevent stack overflows
If buffer lists with too many buffers would be written before, a stack
overflow would happen because of memory linear with the number of
GstMemory would be allocated on the stack. This could happen for example
when filesink is configured with a very big buffer size.

Instead now move the buffer and buffer list writing into the helper
functions and at most write IOV_MAX memories at once. Anything bigger
than that wouldn't be passed to writev() anyway and written differently
in the previous code, so this also potentially speeds up writing for
these cases.

For example the following pipeline would crash with a stackoverflow:
gst-launch-1.0 audiotestsrc ! filesink buffer-size=1073741824 location=/dev/null
2020-03-26 11:31:03 +00:00
..
elements fdsink/filesink: Refactor writev() code to prevent stack overflows 2020-03-26 11:31:03 +00:00
tracers tracers: rusage: use thread-local storage for per-thread stats 2020-02-28 15:54:38 +00:00
meson.build Meson: Add 'coretracers' feature option 2019-12-03 19:01:38 -05:00