On Tue, 27 Sep 2016 13:03:46 -0500 Yong Bakos <j...@humanoriented.com> wrote:
> From: Yong Bakos <yba...@humanoriented.com> > > This series adds documentation to wl_array and its methods. > > There is one implementation change: defining an invalid pointer address, and > setting the `data` pointer to the invalid pointer address after free, in > wl_array_release. I did not set `size` and `alloc` to 0, in order to > keep the change miniminal. (Should I?) > > Regards, > yong Hi Yong, all 4 patches pushed: f7e1dcc..a1ab2c0 master -> master But I did some edits, please check the patches in master: > Yong Bakos (4): > util: Document wl_array This was good. > wl_array: Set data to invalid address after free I removed the doc about crashing. I felf a bit weird to try to guarantee a crash in documentation, and it's not like it was supposed to work before. It's also not a new behaviour one would ever like to rely on. > tests: Test wl_array_release I added a new variable to assign the return value from wl_array_add() instead of array.data. The function itself is supposed to update array.data and we don't want to overwrite it. (It's also kind of illegal to overwrite it.) > array-test: Include wayland-util.h and simplify init test I added this hunk anyway: + /* fill with garbage to emulate uninitialized memory */ + memset(&array, 0x57, sizeof array); I hope it's all fine, but if not, let me know. Thanks, pq > > src/wayland-private.h | 3 +++ > src/wayland-util.c | 1 + > src/wayland-util.h | 75 > +++++++++++++++++++++++++++++++++++++++++++++++---- > tests/array-test.c | 27 +++++++++++-------- > 4 files changed, 90 insertions(+), 16 deletions(-) >
pgpl9dFew2oGV.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel