summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "gatomic: Temporarily disable C11-style atomics on FreeBSD"wip/pwithnall/1940-atomic-typesPhilip Withnall2019-11-201-3/+1
| | | | | | | | | | This reverts commit fd3ed5e31bc0d3d6a0a34d6482bb2ae10f186c06. C11-style atomics have been fixed (on FreeBSD and other platforms) in the previous commit, “gatomic: Check argument width in g_atomic_pointer_compare_and_exchange()”. See !1229 and #1940.
* gatomic: Check argument width in g_atomic_pointer_compare_and_exchange()Philip Withnall2019-11-201-0/+1
| | | | | | | | | | | | Check that the new value is actually pointer-width, rather than (for example) `sizeof (int)` which could happen if someone used `0` rather than `NULL`. Changes suggested by Simon McVittie. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1940
* tests: Use pointers in calls to g_atomic_pointer_compare_and_exchange()Philip Withnall2019-11-201-6/+6
| | | | | | | | | | | | Don’t pass integers; it’s not type-safe. The macro version of `g_atomic_pointer_compare_and_exchange()` used to erroneously accept integers, but they would have the wrong width on some platforms. Changes originally investigated and suggested by Ting-Wei Lan. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1940
* Merge branch 'wip/ernestask/bz-693576-annotations' into 'master'Philip Withnall2019-11-204-2/+149
|\ | | | | | | | | Make GTask more binding-friendly See merge request GNOME/glib!1216
| * task: Add return/propagate API for GValueGarrett Regier2019-11-154-0/+147
| | | | | | | | | | | | This is useful for bindings. Related: https://gitlab.gnome.org/GNOME/glib/issues/668
| * task: Add scope annotation to run_in_thread{,_sync}()Garrett Regier2019-11-051-2/+2
| | | | | | | | | | | | | | Without specifying the scope, the two functions are non-introspectable and GTask cannot be used meaningfully by bindings. Related: https://gitlab.gnome.org/GNOME/glib/issues/668
* | Merge branch 'mcatanzaro/copy-session-state' into 'master'Michael Catanzaro2019-11-181-6/+28
|\ \ | | | | | | | | | | | | Improve documentation for footgun function g_tls_client_connection_copy_session_state() See merge request GNOME/glib!1039
| * | Improve documentation of g_tls_client_connection_copy_session_state()Michael Catanzaro2019-11-181-6/+28
| | | | | | | | | | | | | | | | | | This function has numerous undocumented limitations. In particular, it is not possible to ensure this function actually does anything. Document these problems.
* | | Merge branch 'mcatanzaro/gtlsconnection-changes' into 'master'Michael Catanzaro2019-11-182-53/+38
|\ \ \ | |/ / |/| | | | | | | | Deprecate old GTlsConnection functionality even harder! See merge request GNOME/glib!1227
| * | gtlsclientconnection: use-ssl3 is now ignoredMichael Catanzaro2019-11-181-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | For many years after SSL 3.0 support was removed, we used this function to indicate that we should perform protocol version fallback to the lowest-supported protocol version, to workaround protocol version intolerance. Nowadays this is no longer needed, and support has been removed from glib-networking, so update the documentation.
| * | gtlsconnection: add missing G_PARAM_DEPRECATEDMichael Catanzaro2019-11-181-1/+2
| | | | | | | | | | | | | | | The use-system-certdb function has been deprecated since 2.30 and is just missing the deprecation flag to warn developers.
| * | gtlsconnection: add missing deprecation annotationMichael Catanzaro2019-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | GTlsConnection:rehandshake-mode has been deprecated since 2.60 using the G_PARAM_DEPRECATED flag, but I forgot to add the right annotation to the documentation. Oops. The associated getter/setter functions were both deprecated properly.
| * | gtlsconnection: document rehandshake-mode is no longer supportedMichael Catanzaro2019-11-181-23/+13
|/ /
* | Merge branch '1940-bsd-atomics-failure' into 'master'Simon McVittie2019-11-151-1/+3
|\ \ | | | | | | | | | | | | gatomic: Temporarily disable C11-style atomics on FreeBSD See merge request GNOME/glib!1229
| * | gatomic: Temporarily disable C11-style atomics on FreeBSDPhilip Withnall2019-11-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They’re causing the CI to fail. While someone familiar with FreeBSD investigates the failure, it’s easiest to disable all C11-style atomics than add more preprocessor checks to only disable the atomics added in !1123. If nobody can fix the new C11-style atomics before the 2.64.0 release, this commit should be reverted and a more comprehensive set of preprocessor checks put in place to essentially revert !1123 for BSD only. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1940
* | | Merge branch 'mcatanzaro/gtlsconnection-confusion' into 'master'Philip Withnall2019-11-151-8/+13
|\ \ \ | |/ / |/| | | | | | | | gtlsconnection: clarify handshake() documentation See merge request GNOME/glib!1225
| * | gtlsconnection: clarify handshake() documentationMichael Catanzaro2019-11-131-8/+13
| | | | | | | | | | | | | | | This tries to clarify some confusing aspects of the g_tls_connection_handshake() that can trip up experienced developers.
* | | Merge branch 'fix-utf8-pointer-test' into 'master'Philip Withnall2019-11-142-42/+80
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | gunicode: Fix an UB in gutf8.c and utf8-pointer test Closes #1917 See merge request GNOME/glib!1199
| * | | gunicode: Fix UB in gutf8.c and utf8-pointer testnightuser2019-11-142-42/+80
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In glib/gutf8.c there was an UB in function g_utf8_find_prev_char when p == str. In this case we substract one from p and now p points to a location outside of the boundary of str. It's a UB by the standard. Since this function are meant to be fast, we don't check the boundary conditions. Fix glib/tests/utf8-pointer test. It failed due to the UB described above and aggressive optimisation when -O2 and LTO are enabled. Some compilers (e.g. GCC with major version >= 8) create an optimised version of g_utf8_find_prev_char with the first argument fixed and stored somewhere else (with a different pointer). It can be solved with either marking str as volatile or creating a copy of str in memory. We choose the second approach since it's more explicit solution. Add additional checks to glib/tests/utf8-pointer test. Closes #1917
* | | Merge branch '1750-more-atomic-intrinsics' into 'master'Sebastian Dröge2019-11-144-66/+94
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | gatomic: Use new __atomic_*() intrinsics for all atomic operations Closes #1750 See merge request GNOME/glib!1123
| * | | tests: Remove redundant old atomic testPhilip Withnall2019-10-082-64/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test in `glib/tests/atomic.c` does everything this test did, and more. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1434
| * | | tests: Test g_atomic_pointer_compare_and_exchange() returning falsePhilip Withnall2019-10-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There were tests for the situation where it does the exchange and returns true, but no tests for the situation where it returns false. Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * | | gatomic: Use new __atomic_*() intrinsics for all atomic operationsPhilip Withnall2019-09-251-2/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used the old `__sync_fetch_*()` intrinsics for some of the atomic operations, such as `g_atomic_int_compare_and_exchange()`. When available, use the new `__atomic_*()` intrinsics for those instead. As with the rest of our use of `__atomic_*()` intrinsics, we use the `__ATOMIC_SEQ_CST` memory model. If people want to use a less restrictive memory model to get better performance in certain situations, they can use the compiler intrinsics directly themselves. `g_atomic_*()` aim to be as fast as possible while remaining general purpose. Tested using: ``` meson test --repeat 1000 atomic atomic-test ``` Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1750
* | | | Merge branch 'fix-macos' into 'master'Philip Withnall2019-11-111-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add NOTE_REVOKE to the list of the monitoring events See merge request GNOME/glib!1221
| * | | | Add NOTE_REVOKE to the list of the monitoring eventsAlex Samorukov2019-11-111-1/+1
|/ / / /
* | | | Merge branch 'th/fix-g-param-value-defaults-leak' into 'master'Emmanuele Bassi2019-11-111-0/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | gparam: fix memory leak in g_param_value_defaults() See merge request GNOME/glib!1220
| * | | gparam: fix memory leak in g_param_value_defaults()Thomas Haller2019-11-081-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot just call G_PARAM_SPEC_GET_CLASS (pspec)->value_set_default (pspec, &dflt_value); without initializing the GValue first. It would call param_string_set_default(), which would set the pointer value to a cloned string (which later never gets released, because the GValue is not known to hold a string). Fixes: 6ad799ac677ae241da8b32ecf33b5cc9dc1d30bc
* | | Merge branch 'use-gobject-hole' into 'master'Philip Withnall2019-11-073-6/+128
|\ \ \ | | | | | | | | | | | | | | | | Use the GObject hole on 64bit arches for some flags to improve performance See merge request GNOME/glib!1083
| * | | Use the GObject hole on 64bit arches for some flags to improve performanceAlexander Larsson2019-09-023-6/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses a 32bit hole in the GObject structure on 64bit arches as a flag field which can be optionally used for some preformance hints. Currently there is a flag that gets set any time you connect to a signal on a GObject which is used as early bailout for signal emissions, and using the flags field instead of a user-data for checking if a GObject is under construction.
* | | | Merge branch 'fix-ghashtable-pretty-printer' into 'master'Philip Withnall2019-11-061-3/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | gdb: Fix GHashTable pretty printer off-by-one error See merge request GNOME/glib!1218
| * | | | gdb: Fix GHashTable pretty printer off-by-one errorPhilip Chimento2019-11-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7678b107 seems to have left the GHashTable pretty printer with an off-by-one error, skipping the first key it encounters and printing an extra garbage key/value pair instead. This fixes that by moving an increment to the end of a loop rather than the beginning.
* | | | | Merge branch 'os-info-docs-formatting' into 'master'Philip Withnall2019-11-051-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | gutils: Slightly improve docs formatting for g_get_os_info() See merge request GNOME/glib!1208
| * | | | gutils: Slightly improve docs formatting for g_get_os_info()Philip Withnall2019-11-051-2/+2
|/ / / / | | | | | | | | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | | | Updated Spanish translationDaniel Mustieles2019-11-051-110/+110
| | | |
* | | | Merge branch '1777-sizet-checks' into 'master'Simon McVittie2019-11-051-4/+62
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build: Check size_t compatibility with various other types Closes #1777 See merge request GNOME/glib!1190
| * | | | build: Check size_t compatibility with various other typesPhilip Withnall2019-11-051-4/+62
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When choosing the type to base `size_t` on, check the compatibility of passing pointers, as well as the width of the type, to avoid compiler warnings in future. For now, the code to do the checks is fairly ugly due to limitations in Meson. In particular, the new checks are limited to gcc and clang (other compilers will behave as before), and they are all duplicated. See the comments in the code for links to Meson improvement requests. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1777
* | | | Merge branch '1930-bookmark-file-test-race' into 'master'Simon McVittie2019-11-052-54/+84
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Fix race conditions in bookmarkfile test Closes #1930 See merge request GNOME/glib!1217
| * | | tests: Enable G_TEST_OPTIONS_ISOLATE_DIRS for bookmarkfile testPhilip Withnall2019-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that when running many instances of the test in parallel, they don’t collide in the same current directory, and hence spuriously fail. This can happen when writing `out.xbel`, for example. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1930
| * | | tests: Switch some assertions aroundPhilip Withnall2019-11-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general, we should aim to always check a `GError` before checking a boolean, since the error message from the `GError` gives us a lot more information about failure, which helps with debugging. Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * | | tests: Fix race conditions in bookmarkfile testsPhilip Withnall2019-11-051-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The time handling was assuming that the test would complete in the same second as it started, which was not always true. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1930
| * | | gbookmarkfile: Fix a minor leak on an error pathPhilip Withnall2019-11-051-3/+12
| | | | | | | | | | | | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * | | tests: Use g_assert_*() instead of g_assert() in bookmarkfile testPhilip Withnall2019-11-051-44/+44
|/ / / | | | | | | | | | | | | | | | | | | `g_assert_*()` gives more useful messages on failure, and isn’t compiled out by `G_DISABLE_ASSERT`. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | | Merge branch 'wip/smcv/diagnose-bind-failure' into 'master'Philip Withnall2019-11-041-1/+49
|\ \ \ | | | | | | | | | | | | | | | | gsocket: Improve diagnostics on bind() failure See merge request GNOME/glib!1213
| * | | gsocket: Improve diagnostics on bind() failureSimon McVittie2019-11-041-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | This is in an attempt to diagnose GNOME/glib#1912. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge branch 'wip/smcv/memcmp-null' into 'master'Philip Withnall2019-11-042-2/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | gvariant, gbytes: Avoid memcmp (NULL, ., 0) or memcmp (., NULL, 0) See merge request GNOME/glib!1214
| * | | | gbytes: Avoid memcmp (NULL, ., 0) or memcmp (., NULL, 0)Simon McVittie2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to 3837b83f, glibc memcmp is declared with the first two arguments annotated as non-null via an attribute, which results in the undefined behaviour sanitizer considering it to be UB to pass a null pointer there (even if we are comparing 0 bytes, and hence not actually dereferencing the pointer). This shows up in /gvariant/serialiser/children when run with the undefined behaviour sanitizer. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | | | gvariant: Avoid memcmp (NULL, ., 0) or memcmp (., NULL, 0)Simon McVittie2019-11-041-1/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to 3837b83f, glibc memcmp is declared with the first two arguments annotated as non-null via an attribute, which results in the undefined behaviour sanitizer considering it to be UB to pass a null pointer there (even if we are comparing 0 bytes, and hence not actually dereferencing the pointer). This shows up in /gvariant/serialiser/children when run with the undefined behaviour sanitizer. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge branch 'ci-updates-for-1177' into 'master'Simon McVittie2019-11-042-11/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | CI updates after !1177 See merge request GNOME/glib!1202
| * | | | ci: Update .gitlab-ci.yml to use the latest Docker imagesPhilip Withnall2019-11-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to !1177, now that we’ve generated the new images. Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * | | | ci: Improve Docker building instructions slightlyPhilip Withnall2019-11-041-4/+5
| |/ / / | | | | | | | | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>