glib: Drop G_GNUC_MALLOC usage from various other allocation functionsc849a4ddd3d1da2ff8e7890810bc37f11e1330de260/head
commitc849a4ddd3d1da2ff8e7890810bc37f11e1330de
authorPhilip Withnall <withnall@endlessm.com>
Wed, 22 Aug 2018 10:15:08 +0000 (22 11:15 +0100)
committerPhilip Withnall <withnall@endlessm.com>
Wed, 22 Aug 2018 10:18:02 +0000 (22 11:18 +0100)
tree4b3b6ee822542c29a49ad27e0303bca65481b5ce
parent082730fc3e10a05c7938c06a27c875efd32a729b
glib: Drop G_GNUC_MALLOC usage from various other allocation functions

These functions may be OK to leave the G_GNUC_MALLOC attribute on,
because the only valid pointers in the storage areas they return are,
themselves, new pointers.

However, it’s a lot easier to remove the attributes now than to try and
diagnose miscompilations in future. The performance impact of this is
likely to be unmeasurable. If there are performance problems caused by
this, then they can be profiled and fixed case-by-case in future,
bearing in mind the possibility for miscompilation if G_GNUC_MALLOC is
readded.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1465
glib/gbookmarkfile.h
glib/gconvert.h
glib/gkeyfile.h
glib/gmappedfile.h
glib/gstrfuncs.h