Commit Graph

19856 Commits

Author SHA1 Message Date
Philip Withnall
95e00c7581 docs: Various markup improvements to glib-mkenums man page
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 11:14:22 +00:00
Philip Withnall
c3ac761a18 build: Rename gobjectenumtypes.[ch] to glib-enumtypes.[ch]
To reflect the fact that they contain the GObject types for various
enums defined in libglib.

See https://gitlab.gnome.org/GNOME/glib/merge_requests/481#note_451086.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: GNOME/gobject-introspection#267
2019-03-04 11:12:59 +00:00
Марко Костић
f90e1f317e Update Serbian translation 2019-03-03 16:23:22 +00:00
Daniel Șerbănescu
59954adf6a Update Romanian translation 2019-03-02 20:05:57 +00:00
Марко Костић
6b165f0c3e Update Serbian translation 2019-03-01 15:14:49 +00:00
Philip Withnall
fe01ce2c8d Merge branch 'krnowak/closures-fix' into 'master'
tests: Fix closure-refcount to preserve old semantics

See merge request GNOME/glib!699
2019-02-28 13:32:35 +00:00
Marek Cernocky
6575a9ab79 Updated Czech translation 2019-02-28 12:56:37 +01:00
Krzesimir Nowak
d687a45704 tests: Fix closure-refcount to preserve old semantics
The threads used to iterate at least 10000 times before setting the
"seen thread" flag to true. After porting they inadvertently did that
in the first iteration.
2019-02-28 07:05:29 +01:00
Changwoo Ryu
70cfc9d24c Update Korean translation 2019-02-28 03:15:07 +00:00
Tim Sabsch
acf32b13bb Update German translation 2019-02-27 18:22:53 +00:00
Philip Withnall
7536bacb3d Merge branch 'refcount-fixups' into 'master'
Move closures refcount test to gobject/tests/

See merge request GNOME/glib!696
2019-02-27 16:47:58 +00:00
Michael Catanzaro
8f1cbda085 Merge branch 'wip/tingping/threaded-resolver-unused-pool' into 'master'
gthreadedresolver: Remove unused thread pool

See merge request GNOME/glib!698
2019-02-27 15:53:51 +00:00
Patrick Griffis
5967b4501c gthreadedresolver: Remove unused thread pool 2019-02-27 10:41:32 -05:00
Philip Withnall
0d63ee0908 Merge branch 'wip/tingping/socket-client-slow-fix' into 'master'
gsocketclient: Fix critical on cancellation

Closes #1693 and #1653

See merge request GNOME/glib!688
2019-02-27 14:35:53 +00:00
Patrick Griffis
f0fcb68da5 tests: Unmark gsocketclient-slow as flaky
Closes #1653
2019-02-27 09:20:28 -05:00
Patrick Griffis
80af199d7d gsocketclient: Fix critical on cancellation
We need to be more explicit in handling cancellation to avoid
multiple task returns.

Fixes #1693
2019-02-27 09:20:28 -05:00
Philip Withnall
1ae54da69b tests: Continue closure-refcount test until all three threads are seen
Previously, the test assumed that thread1 and thread2 would be scheduled
enough to set seen_thread{1,2} by the fact that the test runs for a high
number of iterations. On some platforms/schedulers, that’s not true,
which causes the test to spuriously fail.

Fix that by forcing the test to continue iterating until both threads
are seen. If this takes too long, the Meson test runner timeout will be
hit and the test will be terminated.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
86f4a02b65 tests: Fix thread safety in closure-refcount test
Previously, all three threads would access several global variables
without locking.

Fix that by using atomic accesses to data stored within the
test_closure_refcount() function, which also eliminates the global state
(which would confuse further tests if they were added to this file).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
5a2a7f7db1 tests: Port closure-refcount from g_thread_create() to g_thread_new()
g_thread_create() has been deprecated for a long time.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
85c02df04e tests: Use g_assert_*() in closure-refcount, rather than g_assert()
g_assert() can be compiled out if G_DISABLE_ASSERT is defined; and
g_assert_*() provide more specific error messages on failure.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
d6e9111986 tests: Fix some code formatting in closure-refcount
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
31664e62f9 tests: Remove unnecessary static attributes from variables
These functions are not run more than once, so the variables don’t need
to be static to save state between runs.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
3aec6a3976 tests: Minor GObject cleanup in closure-refcount
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
b4aadf6557 tests: Port closure-refcount to g_test_message() from g_print()
This allows more structured test output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 11:59:24 +00:00
Philip Withnall
15958c3ba9 tests: Port closure-refcount to use g_test_run()
This allows more structured test running and output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 11:59:23 +00:00
Philip Withnall
c96bfd57af build: Move tests/refcount/closures to gobject/tests/closure-refcount
One step towards removing the top-level tests/ directory.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1434
2019-02-27 11:48:29 +00:00
Sebastian Dröge
cdcb6c2cf1 Merge branch '1698-base64-encoding' into 'master'
Resolve "g_base64_encode(NULL, 0) causes critical warnings"

Closes #1698

See merge request GNOME/glib!695
2019-02-27 11:42:04 +00:00
Philip Withnall
2484d1c950 gbase64: Remove an unnecessary condition
At that point in the code, len can only be 0, 1 or 2. The code below is
a no-op if (len == 0), so the condition is pointless.

Remove it, and we should be able to achieve full branch coverage of
gbase64.c.

This should introduce no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 11:21:43 +00:00
Philip Withnall
387e762879 tests: Add base64 tests from §(Test Vectors) of RFC 4648
While I’m here, we might as well check that we output what the RFC says
we should output.

https://tools.ietf.org/html/rfc4648#section-10

(We do.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 10:45:02 +00:00
Philip Withnall
f9dfddf8eb gbase64: Fix an impossible condition
len is unsigned, so it’s not possible for it to be less than zero.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 10:44:48 +00:00
Philip Withnall
ff76f6920e gbase64: Allow g_base64_encode (NULL, 0) and g_base64_decode ("", *)
Relax a precondition in g_base64_encode_step() to allow this. It’s valid
to base64 encode an empty string, as per RFC 4648.

Similarly for g_base64_decode(), although calling it with a NULL string
has never been allowed. Instead, clarify the case of calling it with an
empty string.

This includes a unit test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1698
2019-02-27 10:44:14 +00:00
Philip Withnall
86e099c134 gbase64: Convert a precondition from g_error() to g_return_val_if_fail()
The caller needs to check this themselves in any case, so we might as
well at least follow convention in defining the precondition.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 10:13:18 +00:00
Philip Withnall
5c97cf666d Merge branch 'ossfuzz-11578-variant-text-type-detection' into 'master'
gvariant-parser: Fix error handling when type coalescing fails

See merge request GNOME/glib!639
2019-02-26 14:19:08 +00:00
Claude Paroz
d05466753f Update French translation 2019-02-25 14:41:35 +00:00
Philip Withnall
dc6b5f88c4 Merge branch 'update-gvdb' into 'master'
Update gvdb submodule

See merge request GNOME/glib!674
2019-02-25 13:04:08 +00:00
Philip Withnall
2b1bcbc99b Merge remote-tracking branch 'gvdb/master' into update-gvdb 2019-02-25 12:40:10 +00:00
Philip Withnall
25942f0176 Merge branch 'array-size' into 'master'
Fix size of preallocated array

See merge request GNOME/gvdb!3
2019-02-25 12:39:06 +00:00
Philip Withnall
7bf49c8df7 Fix size of preallocated array
Commit 084e1d868 added a preallocation to an array to avoid
reallocations later on, but neglected the fact that after N insertions
into the array, there’s always a NULL terminator added to the end. Fix
the preallocation to include that NULL terminator.

This doesn’t change the correctness of the code, but should eliminate
one reallocation.

Spotted by Sebastian Dröge. See
https://gitlab.gnome.org/GNOME/glib/merge_requests/674.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-25 12:38:08 +00:00
Emmanuele Bassi
78a2dd9632 Merge branch 'threaded-resolver-freebsd' into 'master'
gthreadedresolver: Fix initialisation on FreeBSD

Closes #1697

See merge request GNOME/glib!693
2019-02-25 11:47:56 +00:00
Philip Withnall
d7c93e3f86 Merge branch 'tsan-gtask' into 'master'
gtask: Separate GTask fields memory locations to avoid data races

See merge request GNOME/glib!691
2019-02-25 11:42:12 +00:00
Philip Withnall
6e7e5fff9a gthreadedresolver: Fix initialisation on FreeBSD
res_ninit() requires the __res_state struct passed to it to be
zero-filled on FreeBSD.

Spotted and analysed by Ashish SHUKLA.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes #1697
2019-02-25 11:22:45 +00:00
Philip Withnall
04528e60b6 Merge branch 'valgrind-suppressions' into 'master'
glib.supp: Add more variations of existing suppressions

See merge request GNOME/glib!692
2019-02-25 11:09:57 +00:00
Philip Chimento
e06fe748d0 glib.supp: Add more variations of existing suppressions
There are some cases where valgrind turns up leaks that are already
suppressed in the file, but with a slight difference at the top of the
stack. Add suppressions for these cases as well.
2019-02-24 22:10:36 -08:00
Tomasz Miąsko
fef1ce37e4 gtask: Separate GTask fields memory locations to avoid data races
Ensure that fields that might be accessed in two different threads,
through conflicting actions are stored in seprate memory locations.
2019-02-22 22:22:07 +01:00
Sebastian Dröge
5eb9f9f214 Merge branch 'glib-compile-resources-leak' into 'master'
glib-compile-resources: Fix a minor leak

See merge request GNOME/glib!689
2019-02-22 15:04:59 +00:00
Philip Withnall
7321f240f9 glib-compile-resources: Fix a minor leak
Spotted by oss-fuzz using asan.

oss-fuzz#13271

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-22 14:48:25 +00:00
Milo Casagrande
779448eb93 Update Italian translation 2019-02-22 11:08:24 +00:00
Michael Catanzaro
4d12174663 Merge branch '1679-socket-service-flaky' into 'master'
Resolve "socket-service test is flaky"

Closes #1679

See merge request GNOME/glib!687
2019-02-22 01:33:50 +00:00
Philip Withnall
86201989ea Merge branch 'code-owners' into 'master'
docs: Populate CODEOWNERS file

Closes #1668

See merge request GNOME/glib!684
2019-02-21 19:21:09 +00:00
Philip Withnall
f703bed5eb docs: Populate CODEOWNERS file
Rename it from CODE-OWNERS and make it follow the documented syntax
supported by GitLab:
https://docs.gitlab.com/ee/user/project/code_owners.html. Currently our
version of GitLab doesn’t support it, but it may do in future.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1668
2019-02-21 18:53:47 +00:00