GNOME Bugzilla – Bug 681359
shmsink segfaults under certain conditions
Last modified: 2013-02-28 23:02:57 UTC
Here's a way to reproduce, run: gst-launch-1.0 videotestsrc ! "video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)1000/1" ! shmsink socket-path=/tmp/video-socket And while it's running, launch: gst-launch-1.0 -v shmsrc socket-path=/tmp/video-socket ! fakesink silent=false This results in a segmentation fault. Here is what seems to be the relevant stack trace:
+ Trace 230631
Thread 2 (Thread 0x7f696d22b700 (LWP 21614))
This is due to the default shm-size being too small in that case. Things seem to work by increasing it. A check should be added somewhere (in sp_writer_alloc_bloc()?) to check we don't ask for blocks that are too big.
imho it's a must! none of the program should segfault under any cases!
There were two bugs here, one in the allocator, which wasn't correctly checking the end of the area in this case. So the first patch fixes the bug. But then it would hang forever, so the second patch checks if it will be ever possible to complete an allocation request. commit 684811cddf60f43df14b2fd7a64207f5566b9a32 Author: Olivier Crête <olivier.crete@collabora.com> Date: Wed Feb 27 21:05:38 2013 -0500 shmsink: Error out if memory area is smaller than buffer commit 7a77b41d6a86e98ed60716ece907602ec530ac9c Author: Olivier Crête <olivier.crete@collabora.com> Date: Wed Feb 27 20:57:56 2013 -0500 shm: Make sure to not allocate blocks larger than the shared mem area Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681359
would be nice to add to 0.10 too
just because I like you in 0.10 it is
whooow:-)