Commit Graph

20350 Commits

Author SHA1 Message Date
Philip Withnall
62bd79b6a2 Merge branch 'tdr' into 'master'
Fix data races in task test and gmenumodel test

See merge request GNOME/glib!706
2019-03-06 13:53:24 +00:00
Tomasz Miąsko
330f8999a8 tests: Fix data race in task test
Ensure that all tasks have already completed before accessing buf array
from main thread to avoid conflicting data access from multiple threads.
2019-03-06 14:21:13 +01:00
Emmanuele Bassi
7644b6a368 Merge branch 'api-tags' into 'master'
Bump release version for 2.62 series

See merge request GNOME/glib!709
2019-03-06 12:30:12 +00:00
Philip Withnall
6761bb2f57 build: Factor out common gtkdoc flags
Those lists were getting very long. We can’t quite entirely automate the
list generation since Meson doesn’t have a range() function, but we can
at least combine three of them into one.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:59:03 +00:00
Philip Withnall
a73c9411f9 Merge branch 'exceptions' into 'master'
Basic W32 exception handling for glib

See merge request GNOME/glib!582
2019-03-06 11:58:45 +00:00
Руслан Ижбулатов
66f4c104ba W32 VEH: Add tests
One test is for _g_win32_subst_pid_and_event().
Two tests for crashing with different exceptions (access violation
and illegal instruction).
And one test for running a debugger.
2019-03-06 11:41:58 +00:00
Руслан Ижбулатов
025a346728 W32: Add a simple exception handler
Install a Vectored Exception Handler[0]. Its sole purpose is to catch
some exceptions (access violations, stack overflows, illegal
instructions and debug breaks - by default, but it can be made to catch
any exception for which a code is known) and run a debugger in response.

This allows W32 glib applications to be run without a debugger,
but at the same time allows a debugger to be attached in case
something happens.

The debugger is run with a new console, unless an environment variable
is set to allow it to inherit the console of the crashing process.

The short list of handleable exceptions is there to ensure that
this handler won't run a debugger to "handle" utility exceptions,
such as the one that is used to communicate thread names to a debugger.

The handler is installed to be called last, and shouldn't interfere
with any user-installed handlers.

There's nothing fancy about the way it runs a debugger (it doesn't even
support unicode in paths), and it deliberately avoids using glib code.

The handler will also print a bit of information about the exception
that it caught, and even more information for well-known exceptions,
such as access violation.

The whole scheme is similar to AeDebug[1] and, in fact, the signal-event
gdb command was originally implemented for this very purpose.

[0]: https://docs.microsoft.com/en-us/windows/desktop/debug/vectored-exception-handling
[1]: https://docs.microsoft.com/en-us/windows/desktop/debug/configuring-automatic-debugging
2019-03-06 11:41:56 +00:00
Philip Withnall
925c52760c build: Bump version to 2.61.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:27:24 +00:00
Philip Withnall
e7d091dec1 gversionmacros: add version macros for GLib 2.62
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:26:28 +00:00
Philip Withnall
35db2ffe9c Merge branch 'cancellable-cancel-null' into 'master'
gcancellable: add back lost NULL check in g_cancellable_cancel()

Closes #1710

See merge request GNOME/glib!707
2019-03-05 16:06:29 +00:00
Christoph Reiter
e13c646465 gcancellable: add back lost NULL check in g_cancellable_cancel()
Commit f975858e86 removed the NULL check in g_cancellable_cancel() by
accident which makes it crash when called with NULL.

Add the check back and add a test so this doesn't happen again.

Fixes #1710
2019-03-05 16:44:16 +01:00
Tomasz Miąsko
0679bd2732 tests: Fix data race in gmenumodel test
Synchronize access to server_connection.
2019-03-05 15:14:58 +01:00
Philip Withnall
aeb7dbad30 Merge branch 'tsan' into 'master'
Fix thread safety issues

See merge request GNOME/glib!690
2019-03-05 11:46:33 +00:00
Philip Withnall
2edc5aa6df 2.60.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 20:03:12 +00:00
Philip Withnall
4d04353bbd Merge branch 'trash-check' into 'master'
trash portal: Fix permission checks

See merge request GNOME/glib!704
2019-03-04 19:47:11 +00:00
Matthias Clasen
147ac51f90 trash portal: Fix permission checks
Implement the approach suggested in
https://gitlab.gnome.org/GNOME/glib/merge_requests/276

1. Try to open O_RDWR. On success, pass that fd
2. If EACCESS => fail the trash op, we "need" read-write to successfully trash it
3. If EISDIR => re-open the fd with O_PATH, and pass that (which will fail on snap,
   but verify the dir for flatpaks)
2019-03-04 19:47:11 +00:00
Christoph Reiter
7fa9a2a5da Merge branch 'gi-267-rename-header' into 'master'
Rename gobjectenumtypes.[ch] to glib-enumtypes.[ch]

See merge request GNOME/glib!702
2019-03-04 15:03:40 +00:00
Fabio Tomat
907431da3d Update Friulian translation 2019-03-04 13:33:49 +00:00
Sebastian Dröge
a092dba5f8 Merge branch 'gmarshal-cleanup' into 'master'
Clean up gmarshal.[ch]

See merge request GNOME/glib!703
2019-03-04 13:00:27 +00:00
Matthias Clasen
d7145866a9 Merge branch 'keyfile-backend-dir-permissions' into 'master'
keyfile settings: Use tighter permissions

Closes #1658

See merge request GNOME/glib!604
2019-03-04 12:41:54 +00:00
Philip Withnall
ab93f3f86a gmarshal: Move marshaller documentation comments to above functions
Grouping things together makes them easier to find and keep up to date.
This doesn’t modify any of the comments or make any functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
23f042d284 gmarshal: Drop trailing whitespace from gmarshal.c
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
251430d467 gmarshal: Add copyright headers to gmarshal.[ch]
They were originally generated by glib-genmarshal, which documents its
output as being under the same license as the containing project. In
this case, that’s LGPL.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
1a8e84c540 gmarshal: Drop references to gmarshal.list
It was removed in commit 9c66e65b29.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
54317c9118 tests: Run /gsettings/keyfile test in a temporary directory
Don’t pollute the build directory with files generated by running the
test.

Note that there are still other tests in the gsettings.c test suite
which use the build directory, but fixing them is a bit more involved
than I have time for right now. This is a step in the right direction.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:28:37 +00:00
Matthias Clasen
5e4da714f0 keyfile settings: Use tighter permissions
When creating directories, create them with 700 permissions,
instead of 777.

Closes: #1658
2019-03-04 12:28:37 +00:00
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
Philip Withnall
1f793e9680 Merge branch 'code-owners-more' into 'master'
docs: Add Ting-Wei Lan as a BSD/kqueue code reviewer

See merge request GNOME/glib!701
2019-03-04 11:12:57 +00:00
Philip Withnall
175f0243ed docs: Add Ting-Wei Lan as a BSD/kqueue code reviewer
As agreed on
https://gitlab.gnome.org/GNOME/glib/issues/1668#note_450631. Thanks!

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

Helps #1668
2019-03-04 10:38:17 +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