19932 Commits

Author SHA1 Message Date
Christoph Reiter
e4ae836d40 Merge branch 'backport-875-ci-win32-glib-2-60' into 'glib-2-60'
Backport !875 “CI/msys2: disable coverage reporting, lcov doesn't support gcc9 yet” to glib-2-60

See merge request GNOME/glib!886
2019-06-04 05:48:40 +00:00
Christoph Reiter
97376f95bf CI/msys2: disable coverage reporting, lcov doesn't support gcc9 yet
(Backport: Fix minor cherry-pick conflicts.)

https://github.com/linux-test-project/lcov/issues/58

Fixes: #1795
2019-06-03 12:06:35 +01:00
Philip Withnall
1dfef5df6a gnetworkmonitornm: Consider NM_STATE_CONNECTED_SITE to be available
`NM_STATE_CONNECTED_SITE` is documented to mean that a default route is
available, but that the internet connectivity check failed. A default
route being available is compatible with the documentation for
GNetworkMonitor:network-available, which should be true if the system
has a default route for at least one of IPv4 and IPv6.

https://developer.gnome.org/NetworkManager/stable/nm-dbus-types.html

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

Fixes: #1788


(cherry picked from commit e37f0cbd8914f16d509809a46977e6d32cf72a6e)
2019-05-31 14:45:34 +00:00
Philip Withnall
0f6191d02a Version 2.60.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.60.3
2019-05-21 16:58:44 +01:00
Philip Withnall
b3e1a380d3 Merge branch 'backport-852-gdb-hash-tables-glib-2-60' into 'glib-2-60'
Backport !852 “Update gdb pretty-printer for GHashTable” to glib-2-60

See merge request GNOME/glib!858
2019-05-21 15:52:02 +00:00
zb3
44dbe80e5c Update gdb pretty-printer for GHashTable
Fixes #1780
2019-05-21 12:20:35 +01:00
Emmanuele Bassi
4477ae63ea Merge branch 'backport-848-hash-table-again-glib-2-60' into 'glib-2-60'
Backport !848 (more GHashTable fixes) to glib-2-60

See merge request GNOME/glib!855
2019-05-21 10:29:36 +00:00
Allison Karlitskaya
3bed8a13bc ghash: fix small array handling in g_hash_table_remove_all_nodes()
Factor out the code for setting up the hash table size, mask and mod,
detecting valgrind and allocating the arrays for hashes, keys, and
values.

Make use of this new function from g_hash_table_remove_all_nodes().

The handling of have_big_keys and have_big_values was never correct in
this function because it reallocated the array without changing the
flags in the struct.  Any calls in to the hashtable from destroy
notifies would find the table in an inconsistent state.

Many thanks to Thomas Haller who is essentially responsible for all the
real work in this patch: both discovering and identifying the original
problem, as well as finding the solution to it.
2019-05-20 16:55:45 +01:00
Allison Karlitskaya
2b13c3f797 ghash: Be more explicit about memory in g_hash_table_destroy_all_nodes()
Make it clear that there is a reference transfer going on here, rather
than relying on the fields being overwritten on each branch of the
conditional below.
2019-05-20 16:55:45 +01:00
Allison Karlitskaya
bef8b10c96 ghash: do less work when destroying the table
We were calling g_hash_table_set_shift() to reinitialise the hash table
even in the case of destroying it.  Only do that for the non-destruction
case, and fill the relevant fields with zeros for the destruction case.
This has a nice side effect of causing more certain crashes in case of
invalid reuse of the table after (or during) destruction.
2019-05-20 16:55:45 +01:00
Allison Karlitskaya
c6137e974d ghash: Improve internal documentation
The changes introduced by 18745ff674896c931379d097b18d74678044668e made
the comment at the top of g_hash_table_remove_all_nodes() no longer
correct.  Fix that inaccuracy and add more documentation all-around.
2019-05-20 16:55:45 +01:00
Allison Karlitskaya
64f76bb173 ghash: fix bug introduced by valgrind fix
g_hash_table_new_full() had an invocation of
g_hash_table_realloc_key_or_value_array() with the @is_big argument
incorrectly hardcoded to FALSE, even though later in the function the
values of have_big_keys and have_big_values would be set conditionally.

This never caused problems before because on 64bit platforms, this would
result in the allocation of a guint-sized array (which would be fine, as
have_big_keys and have_big_values would always start out as false) and
on 32bit platforms, this function ignored the value and always allocated
a gpointer-sized array.

Since merge request GNOME/glib!845 we have the possibility for
have_big_keys and have_big_values to start out as TRUE on 64bit
platforms.  We need to make sure we pass the argument through correctly.
2019-05-20 16:55:45 +01:00
Philip Withnall
86c6f7e2b2 Merge branch 'backport-840-hash-table-valgrind-glib-2-60' into 'glib-2-60'
Backport !840 “ghash: Disable small-arrays under valgrind” to glib-2-60

See merge request GNOME/glib!844
2019-05-20 15:55:05 +00:00
Emmanuele Bassi
5e0e3607c7 Merge branch 'backport-828-meson-abaltmon-fix-glib-2-60' into 'glib-2-60'
Backport !828 “build: Fix a typo in the test whether _NL_ABALTMON_n is supported” to glib-2-60

See merge request GNOME/glib!829
2019-05-20 12:26:40 +00:00
Emmanuele Bassi
b53ad5aae2 Merge branch 'backport-845-format-size-buffer-size-glib-2-60' into 'glib-2-60'
Backport !845 “Fixing g_format_size_full() on Windows-x64” to glib-2-60

See merge request GNOME/glib!846
2019-05-20 12:16:12 +00:00
Emmanuele Bassi
a033d368d0 Merge branch 'backport-839-greek-genitive-glib-2-60' into 'glib-2-60'
Backport !839 “tests: Update month name check for Greek locale” to glib-2-60

See merge request GNOME/glib!841
2019-05-20 12:15:45 +00:00
Emmanuele Bassi
ff0fd18683 Merge branch 'backport-814-gschema-fix-glib-2-60' into 'glib-2-60'
Backport !814 “gschema.dtd: Add target attribute to alias” to glib-2-60

See merge request GNOME/glib!816
2019-05-20 12:15:13 +00:00
Philip Withnall
57997abdc1 Merge branch 'wip/tingping/network-address-backport' into 'glib-2-60'
Backport !823 "gnetworkaddress: Fix parallel enumerations interfering with eachother" to glib-2-60

See merge request GNOME/glib!834
2019-05-16 09:01:48 +00:00
Emmanuel Fleury
ba3ff8741f Fixing g_format_size_full() on Windows-x64
For some reasons, the buffer used in the Format struct was not long
enough on Windows-x64 and the final null ('\0') character was omitted
leading to a limited memory disclosure.
2019-05-15 12:28:49 +01:00
Allison Karlitskaya
75f8ec1df9 ghash: Disable small-arrays under valgrind
Valgrind can't find 64bit pointers when we pack them into an array of
32bit values.  Disable this optimisation if we detect that we are
running under valgrind.

Fixes #1749
2019-05-14 16:51:11 +01:00
Rafal Luzynski
4feeb3ec30 tests: Update month name check for Greek locale
Update the abbreviated month name in the test to match the actual
translation. Otherwise the test fails with false positive.

Vocabulary:

July (nominative)  - Greek: Ιούλιος (abbreviated: Ιούλ)
Of July (genitive) - Greek: Ιουλίου (abbreviated: Ιουλ)

This is similar to commit 4d215e006ee69bd7a993bf853722993433adbf9a
and commit 7fe793e125c316ac34edd8158df5a132cb044bc1.

Closes #1776
2019-05-14 10:53:50 +01:00
Emmanuele Bassi
6729a82b0c Merge branch 'backport-835-german-typo-glib-2-60' into 'glib-2-60'
Backport !835 “Fix typo in German translation” to glib-2-60

See merge request GNOME/glib!838
2019-05-13 15:00:08 +00:00
Martin Kröning
72817af402 Fix typo in German translation 2019-05-13 11:49:57 +01:00
Patrick Griffis
1b77792ac3 gnetworkaddress: Fix parallel enumerations interfering with eachother
The parent GNetworkAddress contains a shared list of resolved
addresses that is used as a cache for multiple enumerations.

This commit ensures that the cache is only set upon completion of
DNS lookups and only read once by enumerations to avoid being in a
bad state.

Fixes #1771
2019-05-10 18:08:48 -07:00
Rafal Luzynski
aeb68d5349 build: Fix a typo in the test whether _NL_ABALTMON_n is supported
The correct spelling is "_NL_ABALTMON_n" rather than "_NL_ALTMON_n".
The typo made Meson build think that _NL_ABALTMON_n constants are
not supported which was totally wrong. This made g_date_time_format()
output incorrect abbreviated month names in some languages.
The old configure.ac script was correct here.

Bug introduced in commit be4f96b6502c01d2a51d60b7a669c8ef82e22a4d.

Closes: #1759
2019-05-10 11:55:56 +01:00
Michael Catanzaro
2b42205193 Merge branch 'backport-824-socketclient-leak-glib-2-60' into 'glib-2-60'
Backport !824 “gsocketclient: Fix a leak in the connection code” to glib-2-60

See merge request GNOME/glib!826
2019-05-09 20:22:38 +00:00
Allison Karlitskaya
daac518778 gsocketclient: Fix a leak in the connection code
We miss releasing the async operation's reference on a state object in
one of the error cases.

The call to connection_attempt_remove() (although it calls unref
internally) is not sufficient because this is releasing the reference
that the list owns.

Closes #1774
2019-05-09 17:54:37 +01:00
Ernestas Kulik
05ea79d529 gschema.dtd: Add target attribute to alias
The implementation requires it, but the DTD doesn’t even mention it.
2019-05-07 11:45:10 +01:00
Michael Catanzaro
3f40ca54b0 Merge branch 'cherry-pick-b17436d9' into 'glib-2-60'
Merge branch 'wip/tingping/socketclient-cancel-2' into 'master'

See merge request GNOME/glib!815
2019-05-06 22:16:14 +00:00
Michael Catanzaro
0195a56334 Merge branch 'wip/tingping/socketclient-cancel-2' into 'master'
gsocketclient: Fix potential critical when cancelling connect

Closes #1747

See merge request GNOME/glib!783

(cherry picked from commit b17436d952f5ad682dfe98e0eca7bc31705cf776)

313e7cba gsocketclient: Fix potential critical when cancelling connect
2019-05-06 21:53:28 +00:00
Philip Withnall
a3b5608170 Version 2.60.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.60.2
2019-05-03 14:30:03 +01:00
Sebastian Dröge
47e06aedc1 Merge branch 'backport-786-cocoa-notification-mem-handling-glib-2-60' into 'glib-2-60'
Backport !786: “cocoanotificationbackend: do not release readonly property” to glib-2-60

See merge request GNOME/glib!793
2019-05-02 13:02:23 +00:00
Sebastian Dröge
745112dfd3 Merge branch 'backport-781-network-monitor-glib-2-60' into 'glib-2-60'
Backport !781 “gnetworkmonitornm: Fix network available detection” to glib-2-60

See merge request GNOME/glib!803
2019-05-02 12:46:29 +00:00
Fabrice Bellet
567a2c7e78 gnetworkmonitornm: Fix network available detection
The network-available property can be asserted by querying the NMState
describing the current overval network state, instead of the
NMConnectivityState. The advantage of the NMState is that is reflects
immediately the network state modification, while the connectivity
state is tested at a fixed frequency.
2019-04-29 13:07:51 +01:00
Ignacio Casal Quinteiro
0733bf1f58 cocoanotificationbackend: do not release readonly property
Fixes a crash when releasing a property that was not retained before.

Helps: https://gitlab.gnome.org/GNOME/glib/issues/1751
2019-04-25 10:14:13 +01:00
Philip Withnall
5391fd2073 Merge branch 'gresource-compiler-2-60' into 'glib-2-60'
glib/gconstructor.h: Include stdlib.h for MSVC builds

See merge request GNOME/glib!790
2019-04-24 09:19:38 +00:00
Chun-wei Fan
42fe9a5bb0 glib/gconstructor.h: Include stdlib.h for MSVC builds
This is in case the compiler complains that we don't have the prototypes
for atexit(), and it doesn't hurt to include that file here.
2019-04-24 13:30:44 +08:00
Robert Antoni Buj Gelonch
ab1cc89209 Update Catalan translation 2019-04-17 16:53:07 +00:00
Philip Withnall
527022ae14 2.60.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.60.1
2019-04-15 11:47:26 +01:00
Emmanuele Bassi
084f639c28 Merge branch 'backport-776-external-data-test-glib-2-60' into 'glib-2-60'
Backport !776 “tests: Only run --external-data test on GNU ld/objcopy” to glib-2-60

See merge request GNOME/glib!778
2019-04-15 09:42:15 +00:00
Philip Withnall
30b153923f tests: Only run --external-data test on GNU ld/objcopy
Other GCC-like implementations of ld/objcopy (like LLVM) don’t yet
support the right command line arguments, so can’t compile the test.

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

https://gitlab.gnome.org/GNOME/glib/issues/1709
2019-04-15 10:26:18 +01:00
Philip Withnall
63f42284fa build: Refactor resources test build instructions
This introduces no functional changes, but combines two duplicated lists
and makes the meson.build file a little easier to follow.

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

Helps: #1711
2019-04-15 10:26:18 +01:00
Philip Withnall
cd11f2415f build: Fix some whitespace problems in gio/tests/meson.build
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-04-15 10:26:18 +01:00
Philip Withnall
44d7c68301 Merge branch 'fix-iconv-libc-macos' into 'glib-2-60'
meson: Hotfix for iconv detection on macOS

See merge request GNOME/glib!775
2019-04-11 14:37:56 +00:00
Nirbheek Chauhan
fcf68f8f31 meson: Hotfix for iconv detection on macOS
macOS/iOS do not ship iconv inside the C library, so don't try to look
for that at all when targetting macOS or iOS.

The proper fix involved changing the options and will be merged in
master: https://gitlab.gnome.org/GNOME/glib/merge_requests/759
2019-04-11 18:00:05 +05:30
Sebastian Dröge
13ea376a54 Merge branch 'backport-1737-gdbus-tool-wait-timeout-glib-2-60' into 'glib-2-60'
Backport !753 “gdbus-tool: Fix units for `gdbus-tool wait` timeout” to glib-2-60

See merge request GNOME/glib!764
2019-04-09 08:54:16 +00:00
Philip Withnall
7bd0160a17 gdbus-tool: Fix units for gdbus-tool wait timeout
They were documented as being in seconds, but implemented as
milliseconds.

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

Fixes: #1737
2019-04-03 17:05:28 +01:00
Emmanuele Bassi
9ec712db28 Merge branch 'backport-719-nm-monitor-check-glib-2-60' into 'glib-2-60'
Backport !719 “Handle an UNKNOWN NetworkManager connectivity as NONE” to glib-2-60

See merge request GNOME/glib!727
2019-04-03 14:13:42 +00:00
LRN
9b6278057c Merge branch 'backport-win32-rundll-dbus-path-glib-2-60' into 'glib-2-60'
gdbusaddress, win32: backport using cwd for running rundll32

See merge request GNOME/glib!758
2019-04-02 03:21:53 +00:00
Vasily Galkin
066ce38799 gdbusaddress, win32: don't rely on short names
Closes: https://gitlab.gnome.org/GNOME/glib/issues/1566

Short names were used in win32 implementation to allow launching
on installations where full path to libgio-2.0-0.dll contain spaces.
However, short names are optional on windows: so if they were disabled
that method fails - see issue linked above.

Since rundll32 doesn't support neither spaces, nor quotes in cmdline
this patch changes rundll32 argument to just .\gio-dll-name.dll
and uses the entire path directory containing gio dll as rundll32
current directory.

Added comments informing about potential subtleties discovered during
writing test for gdbusaddress on win32.
There are not known to have real-world user-visible effect,
so by now I'm only adding comments without creating issues.
2019-03-28 20:57:04 +03:00