Commit Graph

21015 Commits

Author SHA1 Message Date
Nirbheek Chauhan
031b3de2ea Merge branch 'fix-gmodule-macos' into 'master'
gmodule: use dl implementation on macOS

Closes #1887

See merge request GNOME/glib!1091
2019-09-07 14:59:20 +00:00
Emin Tufan Çetin
1e91cb0f36 Update Turkish translation 2019-09-07 13:35:47 +00:00
Tom Schoonjans
036f6ca7e3 gmodule: write test for shared libraries 2019-09-06 19:03:31 +01:00
Tom Schoonjans
e2409e5e18 gmodule: use dl implementation on macOS
Closes #1887
2019-09-06 15:27:04 +01:00
Sebastian Dröge
963749da61 Merge branch 'io-create-watch-docs' into 'master'
giochannel: Clarify type of GSource callback in documentation

See merge request GNOME/glib!1090
2019-09-06 10:33:53 +00:00
Philip Withnall
f02c6eb514 giochannel: Clarify type of GSource callback in documentation
This should clarify questions like
https://stackoverflow.com/q/57807738/2931197.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-06 10:49:39 +01:00
Milo Casagrande
f7eed7eabd Update Italian translation 2019-09-06 08:45:03 +00:00
Philip Withnall
a1af0be78c 2.62.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-05 17:54:38 +01:00
Philip Withnall
fcae793cb1 Merge branch 'wip/chergert/fix-modification-date-time' into 'master'
fileinfo: ignore USEC if not available

See merge request GNOME/glib!1087
2019-09-05 16:41:44 +00:00
Philip Withnall
475b9b5f7c tests: Add tests for GFileInfo modification time
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-05 17:13:08 +01:00
Philip Withnall
b99cdf56dc tests: Use g_assert_*() rather than g_assert() in g-file-info test
They provide more detailed failure messages, and aren’t compiled out
when building with `G_DISABLE_ASSERT`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-05 17:13:08 +01:00
Christian Hergert
b933b0f369 fileinfo: ignore USEC if not available
When future porting deprecated code to use
g_file_info_get_modification_date_time() we risk a number of breakages
because the current implementation also requires the additional use of
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC. This handles that situation gracefully
and returns a GDateTime with less precision.

Applications that want the additional precision, are already using the
additional attribute.

(Minor tweaks by Philip Withnall.)
2019-09-05 17:13:08 +01:00
Philip Withnall
8f52d2cb02 gboxed: Fix two potential NULL pointer dereferences
I don’t think these could be hit in practice due to the guarantees of
the type system, but the static analyser doesn’t know that — so make the
assertions clearer to shut it up.

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

Helps: #1767
2019-09-05 14:17:11 +01:00
Philip Withnall
8fe58ffe12 gdbusdaemon: Fix unused variable warning
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1767
2019-09-05 14:17:08 +01:00
Philip Withnall
d99653f6fe gdbusdaemon: Add sanity checks on name refcounting
This should make the code a bit easier to reason about, and squash some
static analysis warnings.

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

Helps: #1767
2019-09-05 14:17:05 +01:00
Philip Withnall
df647a583d tests: Fix a couple of static analysis warnings in autoptr tests
The static analyser can’t yet work out how `g_autofree` works, so
disable those tests.

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

Helps: #1767
2019-09-05 14:17:02 +01:00
Philip Withnall
0b4162e714 build: Disable dtrace probes under static analysis
The macros for the probes confuse the static analyser, and are often
called with arguments which the analyser things shouldn’t be used any
more (for example, the address of a block of memory which has just been
freed).

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

Helps: #1767
2019-09-05 14:16:58 +01:00
Philip Withnall
18a232be89 glib: Various minor scan-build fixes
These squash various warnings from `scan-build`. None of them are
legitimate bugs, but some of them do improve code readability a bit.

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

Helps: #1767
2019-09-05 13:51:27 +01:00
Rafael Fontenelle
7a33239bab Update Brazilian Portuguese translation 2019-09-05 05:26:09 +00:00
Philip Withnall
8c9bf7f741 Merge branch 'gobject_init-suppression' into 'master'
glib.supp: make gobject_init() calloc also of the possible kind

See merge request GNOME/glib!1086
2019-09-04 18:24:22 +00:00
Claudio Saavedra
9cc863e59a glib.supp: make gobject_init() calloc also of the possible kind
It's currently marked only as reachable but Valgrind also finds it as
possible:

==18842== 96 bytes in 1 blocks are possibly lost in loss record 2,029 of 2,284
==18842==    at 0x4837B65: calloc (vg_replace_malloc.c:762)
==18842==    by 0x49614AD: g_malloc0 (gmem.c:129)
==18842==    by 0x4A7013B: type_node_any_new_W (gtype.c:439)
==18842==    by 0x4A70609: type_node_fundamental_new_W (gtype.c:550)
==18842==    by 0x4A7855A: gobject_init (gtype.c:4406)
==18842==    by 0x4A78672: gobject_init_ctor (gtype.c:4493)
2019-09-04 16:36:39 +03:00
Steve Frécinaux
11dce0fd2f docs: fix a misunderstanding in g_type_add_interface_*
The previous documentation said this:
  g_type_add_interface_static:
    "Adds the static interface_type to instantiable_type"
  g_type_add_interface_dynamic:
    "Adds the dynamic interface_type to instantiable_type"

The above suggests that if one is adding a static interface to a dynamic
object, one should use g_type_add_interface_static because the interface
is static, but the code and usage (with the newly added
G_IMPLEMENTS_INTERFACE_DYNAMIC) imply that this is wrong, and that
what matters is whether the *instanciable_type* is dynamic or not.

Hence this patch moves the "static" and "dynamic" words close to
"instantiable_type".

Closes issue #259
2019-09-04 11:58:21 +02:00
Fabio Tomat
ef47ecd665 Update Friulian translation 2019-09-03 09:13:57 +00:00
Will Thompson
4aba03562b gdbus-codegen: emit GUnixFDLists if an arg has type 'h'
Previously, if a method was not annotated with org.gtk.GDBus.C.UnixFD
then the generated code would never contain GUnixFDList parameters, even
if the method has 'h' (file descriptor) parameters. However, in this
case, the generated code is essentially useless: the method cannot be
called or handled except in degenerate cases where the file descriptors
are missing or ignored.

Check the argument types for 'h', and if present, generate code as if
org.gtk.GDBus.C.UnixFD annotation were specified.

This change will break any existing code which refers to the (useless)
wrappers for such methods. The workaround for such code is to add the
org.gtk.GDBus.C.UnixFD annotation, which will cause the same generated
code to be emitted before and after this change.

If this is found to cause widespread problems, we can explore a
different approach (perhaps emitting a warning from the code generator,
or annotating the symbols as deprecated).

https://gitlab.gnome.org/GNOME/glib/issues/1726
2019-09-02 20:47:20 +01:00
Philip Withnall
3e6fe8cd27 Merge branch 'fix-sizeof-check' into 'master'
garray: Fix reference to GLIB_SIZEOF_INT

See merge request GNOME/glib!1084
2019-09-02 15:17:23 +00:00
Alexander Larsson
4f5a2c19e4 garray: Fix reference to GLIB_SIZEOF_INT
This doesn't ever get set. SIZEOF_INT is set though, so use that instead.
2019-09-02 16:05:07 +02:00
Sebastian Dröge
daa308dd6e Merge branch '487-ci-memcheck' into 'master'
Add CI job for running tests under Valgrind

Closes #487

See merge request GNOME/glib!169
2019-09-02 13:52:35 +00:00
Philip Withnall
39052a1cfc tests: Fix some minor memory leaks in tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 14:16:33 +01:00
Philip Withnall
8ae07a727a glib.supp: Add some fundamental type suppressions
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 14:16:33 +01:00
Philip Withnall
c8c75dc7ad glib.supp: Fix some indentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 14:16:33 +01:00
Philip Withnall
adb9264d12 glib.supp: Add leak types
Mark all the memcheck leaks as ‘reachable’, so the suppressions will not
apply if that memory is no longer reachable on exit(). This feature was
introduced in Valgrind 3.9, and is documented here:

http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 14:16:33 +01:00
Philip Withnall
a6ecfeea4c tests: Don’t run Python tests under Valgrind
The Python runtime is not amenable to Valgrind, and leak checking is a
lot less relevant in Python compared to C.

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

Helps: #487
2019-09-02 14:16:33 +01:00
Philip Withnall
0cc745f6cb ci: Include stderr output in JUnit XML report
When running tests under valgrind, the valgrind summary is printed in
stderr, and the TAP output is printed in stdout. The valgrind summary is
useful to include in the GitLab test report, so append it to the
textual failure information for failed tests.

I can’t find a better XML element in the [JUnit
schema](https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd)
for representing it.

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

Helps: #487
2019-09-02 14:16:33 +01:00
Philip Withnall
197eff3fc8 ci: Add valgrind memcheck support on Fedora
Add a separate CI job which runs memcheck on the unit tests. This is
done as a separate job from the main build, since we don’t want it to
interact with code coverage at all.

Currently, failure of this job is ignored. Issue #333 will eventually
fix that.

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

Fixes: #487
2019-09-02 14:16:33 +01:00
Philip Withnall
8d19b95bd8 ci: Add valgrind to fedora Docker image
It will be used in an upcoming commit.

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

Helps: #487
2019-09-02 14:16:33 +01:00
Philip Withnall
e8ea2aebe7 gerror: Add a docs paragraph about not displaying errors verbatim in UI
It’s confusing and often doesn’t help the user. Match the error code and
come up with a more UI-appropriate error message.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 14:16:33 +01:00
Philip Withnall
cf990faae5 2.61.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 13:58:31 +01:00
Philip Withnall
2118a8f73b tests: Fix skipping mkdir-with-parents-permission test
If the user has `CAP_DAC_OVERRIDE` or similar (for example, if running
the tests as root), the `mkdir-with-parents-permission` test is skipped.

The check for `CAP_DAC_OVERRIDE` was by creating a subdirectory of the
test directory. That subdirectory, however, was never removed, which
caused a ‘directory not empty’ error when trying to delete the test
directory.

Fix that by correctly deleting the subdirectory if skipping the test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-02 13:35:44 +01:00
Emmanuele Bassi
4a089f9227 Merge branch 'ossfuzz-16101-iso8601-parsing' into 'master'
Improve ISO 8601 parsing by GDateTime

See merge request GNOME/glib!1017
2019-09-02 11:19:04 +00:00
Emmanuele Bassi
a0cbb32680 Merge branch '1309-delayed-settings-changed' into 'master'
gsettings: Add missing changed() call to delayed settings backend

Closes #1309

See merge request GNOME/glib!1046
2019-09-02 11:14:59 +00:00
Philip Withnall
b3b6830d9a Merge branch 'wip/lantw/gthread-set-thread-name-on-bsd' into 'master'
gthread: Set thread name on *BSD

Closes #1761

See merge request GNOME/glib!1072
2019-09-02 11:10:16 +00:00
Will Thompson
9b827e5674 gdbus-codegen: process C.UnixFD annotation in one place
This will make it simpler to enable this behaviour based on the method
signature.

https://gitlab.gnome.org/GNOME/glib/issues/1726
2019-09-02 06:54:37 +01:00
Marek Černocký
eca386cc97 Updated Czech translation 2019-09-02 02:49:46 +02:00
Aurimas Černius
7b26d427b0 Updated Lithuanian translation 2019-09-01 22:33:58 +03:00
Changwoo Ryu
199bb530c0 Update Korean translation 2019-09-01 09:00:32 +00:00
Balázs Úr
ffef6cf413 Update Hungarian translation 2019-09-01 05:39:54 +00:00
Philip Withnall
201c9deacf Merge branch 'patch-1' into 'master'
Adjust README formatting

See merge request GNOME/glib!1074
2019-08-30 07:16:26 +00:00
Philip Withnall
9c8c1c44eb Merge branch 'gtype-leak-suppression' into 'master'
glib.supp: add suppression for g_type_class_ref()

See merge request GNOME/glib!1075
2019-08-30 06:55:39 +00:00
Philip Withnall
202c07e904 Merge branch 'goption_add_sanity_checks_to_inputs' into 'master'
goption: add sanity check to input parameters

Closes #1057

See merge request GNOME/glib!1073
2019-08-30 06:50:45 +00:00
Claudio Saavedra
6e4a02b9bc glib.supp: add suppression for g_type_class_ref()
This suppression is not caught by glib.supp, so add it:

==21145== 32 bytes in 1 blocks are possibly lost in loss record 1,456 of 2,584
==21145==    at 0x4837B65: calloc (vg_replace_malloc.c:762)
==21145==    by 0x495825E: g_malloc0 (gmem.c:129)
==21145==    by 0x4A6B6EB: type_class_init_Wm (gtype.c:2134)
==21145==    by 0x4A6D22A: g_type_class_ref (gtype.c:2950)
==21145==    by 0x4A6D1DD: g_type_class_ref (gtype.c:2942)
==21145==    by 0x4A5C9C6: g_param_spec_enum (gparamspecs.c:2085)
2019-08-30 09:27:31 +03:00