Commit Graph

6066 Commits

Author SHA1 Message Date
Philip Withnall
5e0b12df1a gvariant: Check array offsets against serialised data length
When getting a child from a serialised variable array, check its offset
against the length of the serialised data of the array (excluding the
length of the offset table). The offset was already checked against the
length of the entire serialised array (including the offset table) — but a
child should not be able to start inside the offset table.

A test is included.

oss-fuzz#9803

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-23 17:01:51 +13:00
Philip Withnall
7c4e6e9fbe gvarianttype: Impose a recursion limit of 128 on variant types
Previously, GVariant has allowed ‘arbitrary’ recursion on GVariantTypes,
but this isn’t really feasible. We have to deal with GVariants from
untrusted sources, and the nature of GVariantType means that another
level of recursion (and hence, for example, another stack frame in your
application) can be added with a single byte in a variant type signature
in the input. This gives malicious input sources far too much leverage
to cause deep stack recursion or massive memory allocations which can
DoS an application.

Limit recursion to 128 levels (which should be more than enough for
anyone™), document it and add a test. This is, handily, also the limit
of 64 applied by the D-Bus specification (§(Valid Signatures)), plus a
bit to allow wrapping of D-Bus messages in additional layers of
variants.

oss-fuzz#9857

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-23 17:01:51 +13:00
Philip Withnall
eb7c9adc3b gvariant: Fix checking arithmetic for tuple element ends
When checking whether a serialised GVariant tuple is in normal form,
it’s possible for `offset_ptr -= offset_size` to underflow and wrap
around, resulting in gvs_read_unaligned_le() reading memory outside the
serialised GVariant bounds.

See §(Tuples) in gvariant-serialiser.c for the documentation on how
tuples are serialised. Briefly, all variable-length elements in the
tuple have an offset to their end stored in an array of offsets at the
end of the tuple. The width of each offset is in offset_size. offset_ptr
is added to the start of the serialised tuple to get the offset which is
currently being examined. The offset array is in reverse order compared
to the tuple elements, hence the subtraction.

The bug can be triggered if a tuple contains a load of variable-length
elements, each of whose length is actually zero (i.e. empty arrays).

Includes a unit test.

oss-fuzz#9801

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-23 17:01:51 +13:00
Philip Withnall
ec5d6ab63d gfileutils: Add examples to g_path_get_dirname() documentation
See https://gitlab.gnome.org/GNOME/glib/merge_requests/326.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-23 14:38:13 +13:00
Philip Withnall
da512adc34 Merge branch 'stap-pass-cflags' into 'master'
build-sys: Pass CFLAGS to $(DTRACE)

See merge request GNOME/glib!403
2018-10-22 22:39:59 +00:00
Nirbheek Chauhan
8b3590c231 meson: Add macOS libtool versioning for ABI compatibility
With this, the compatibility version and current version values in macOS
and iOS dylibs will match the values set by Autotools.

See: https://github.com/mesonbuild/meson/issues/1451
2018-10-22 06:51:32 +05:30
Simon McVittie
442b54f00c meson: Mark 1bit-emufutex test as slow
Emulated futexes are slower than real ones; if they were not, there
would be no point in using the real futexes. On some machines they
are sufficiently slow to cause test timeouts.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-19 09:20:25 +01:00
Colin Walters
d7233ef81e build-sys: Pass CFLAGS to $(DTRACE)
Fedora is using https://fedoraproject.org/wiki/Changes/Annobin
to try to ensure that all objects are built with hardening flags.
Pass down `CFLAGS` to ensure the SystemTap objects use them.
2018-10-15 21:50:31 +00:00
Fabrice Fontaine
09c149453a grefcount: add missing gatomic.h
Without gatomic.h, build fails on:
In file included from garcbox.c:24:0:
garcbox.c: In function ‘g_atomic_rc_box_acquire’:
grefcount.h:101:13: error: implicit declaration of function ‘g_atomic_int_get’; did you mean ‘__atomic_store’? [-Werror=implicit-function-declaration]
     (void) (g_atomic_int_get (rc) == G_MAXINT ? 0 : g_atomic_int_inc ((rc))); \
             ^
garcbox.c:292:3: note: in expansion of macro ‘g_atomic_ref_count_inc’
   g_atomic_ref_count_inc (&real_box->ref_count);

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-10-13 23:10:33 +02:00
Hans Petter Jansson
d3074a748f ghash: Fix out-of-range use of signed integer
We were mistakenly shifting a signed int literal by up to 31 places.
Specify unsigned int instead.

Closes #1570
2018-10-12 13:09:39 +02:00
Philip Withnall
efda2be302 Merge branch 'ghash-hpj-2018' into 'master'
GHashTable improvements

See merge request GNOME/glib!208
2018-10-10 23:01:51 +00:00
Philip Withnall
0b45ddc556 Merge branch 'poolname' into 'master'
gthreadpool: Include prgname in thread name

See merge request GNOME/glib!374
2018-10-10 22:45:08 +00:00
Vincent Whitchurch
c50bdf07e8 gthreadpool: Include prgname in thread name
All pool threads are named "pool" and this a bit annoying when looking
at system-wide traces or statistics for a system where several
applications use thread pools.  Include the prgname in the thread names
to get a better default name.  The total length including the "pool-"
prefix is limited to 16 bytes in order for it to work on all systems.

Change-Id: I473a9f534c4630f3e81da72ff96d8f593c60efac
2018-10-10 10:57:39 +02:00
Mohammed Sadiq
0e7ebf794f gmacros: Fix G_[UN]LIKELY to not mask -Wparentheses
A double paren forces the compiler to assume that the
statement is right.  That may not be the case.

This is essentially reverting b44fba25fb.
See https://bugzilla.gnome.org/show_bug.cgi?id=760215.

It's more morth to allow find common mistakes (= instead of ==
in conditionals) than masking them to make some rarely used
code work.
2018-10-09 06:44:14 +05:30
Emmanuele Bassi
4d215e006e tests: Update month name check for Lithuanian locale
Update the abbreviated month name in the test to match the GNU libc
translation, coming from CLDR.

Fixes #1562
2018-10-04 14:43:53 +02:00
Hans Petter Jansson
eed0f182fd tests: Remove assertion that unused buckets should have NULL key/value
We still clear the key/value on removal, but since we're growing the
arrays with realloc() now, we can't guarantee that incoming memory is
cleared. There's no reason it should be either, since we check the
hashes array (which is always in a defined state) before accessing the
other arrays.
2018-10-03 22:14:38 +02:00
Hans Petter Jansson
9986395638 ghash: Use realloc in place of alloc for key/value
Minor simplification resulting in the removal of redundant alloc wrappers.
2018-10-03 22:14:38 +02:00
Hans Petter Jansson
194eef5f17 ghash: Be less eager to opportunistically grow the table on cleanup
When g_hash_table_resize() gets called, we clear out tombstones and grow
the table at the same time if needed. However, the threshold was set too
low, so we'd grow if the load was greater than .5 after subtracting
tombstones. Increase this threshold to ~.75.
2018-10-03 22:14:38 +02:00
Hans Petter Jansson
7eaf018b29 ghash: Significantly reduce peak memory use
When resizing, we were keeping both the old and new hash, key and value
arrays around while we reinserted entries, resulting in a peak memory
overhead of 50%. Using a temporary bookkeeping array with one bit per
entry we can now grow and shrink the main arrays using realloc() and an
eviction scheme, reducing the overhead to .625% (assuming 64-bit keys and
values). Tests show the CPU overhead is negligible.
2018-10-03 22:14:32 +02:00
Hans Petter Jansson
dc983d74cc ghash: Use less memory when storing ints on 64-bit platforms
If int is smaller than void * on our arch, we start out with
int-sized keys and values and resize to pointer-sized entries as
needed. This saves a good amount of memory when the HT is being
used with e.g. GUINT_TO_POINTER().
2018-10-03 22:11:07 +02:00
Philip Withnall
96c653265f gmessages: Reformat g_return_*if_fail() macros to fix whitespace
I’m fed up of trying to read these and having my head done in by mixed
tabs and spaces.

This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-03 14:45:12 +01:00
Philip Withnall
7b5756577f Merge branch 'fix-leaking-g_get_language_names_with_category' into 'master'
gcharset: fix leaking g_get_language_names_with_category

See merge request GNOME/glib!338
2018-10-02 10:42:14 +00:00
Philip Withnall
32e049b761 Merge branch 'win32-gstat-for-ucrt' into 'master'
W32: gstat fixes for ucrt

Closes #1452

See merge request GNOME/glib!257
2018-10-02 08:55:45 +00:00
Philip Withnall
846a61457a Merge branch 'wjt/g_desktop_app_info_get_string_list' into 'master'
Add g_desktop_app_info_get_string_list(); fix g_key_file_free()

See merge request GNOME/glib!339
2018-10-01 19:21:05 +00:00
Ryan Schmidt
a187c89002 Fix build failure on systems without spawn.h 2018-09-28 23:50:40 -05:00
Xavier Claessens
6e0a03ee07 Merge branch '1536-link-whole' into 'master'
Meson: Fix static linking of convenience libraries

Closes #1536

See merge request GNOME/glib!357
2018-09-28 14:54:40 +00:00
Simon McVittie
62af03bda8 Meson: Extract objects from convenience libraries to link them
This avoids the convenience library being treated as though it was
an installed static library (objects not included in the dependent
static library, and convenience library being listed in the pkg-config
metadata), both of which would make static linking impossible.
This is a workaround for meson not having
https://github.com/mesonbuild/meson/pull/3939 merged yet.

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1536
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-09-28 15:15:48 +01:00
Philip Withnall
c824ffd377 Merge branch 'wip/rishi/docs-garray' into 'master'
Documentation tweaks for g_array_free

See merge request GNOME/glib!348
2018-09-28 13:06:04 +00:00
Xavier Claessens
88a1188fc1 Merge branch 'speling' into 'master'
Fix spelling mistakes detected by Debian's Lintian tool

See merge request GNOME/glib!354
2018-09-25 18:16:52 +00:00
Xavier Claessens
af9e67c776 Merge branch '1544-gtester-report' into 'master'
Generate gtester-report from .in file

Closes #1544

See merge request GNOME/glib!352
2018-09-25 18:00:13 +00:00
Simon McVittie
8346017b17 Generate gtester-report from .in file
Previously, it was installed unmodified by the Meson build system.

We don't need to define @bindir@, because gtester-report never
actually referred to it. We also don't need a definition of
GTESTER_REPORT for use by GLib itself, because its last use was removed
in 2013 (https://bugzilla.gnome.org/show_bug.cgi?id=709995).

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1544
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-09-25 17:34:57 +01:00
Simon McVittie
59bede934c Spelling: Fix a common en_FR spelling of "information"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-09-25 14:35:11 +01:00
Simon McVittie
cbc7fbbf7d meson: Run build-time tests with --tap where supported
This makes it easier to debug test failures, by ensuring that g_debug()
and g_test_message() are printed as TAP diagnostics.

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1528
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-09-24 23:37:12 +01:00
Debarshi Ray
0a8f3698a0 docs: Simplify the text for g_array_free
The text about deallocation of GArrays with elements containing
dynamically-allocated memory was confusing. It initially mentioned
clear_func, but later said elements with dynamically allocated memory
"should be freed separately".

Clarify this by using the same structure as g_ptr_array_free —
highlight the need to set a clear_func by consolidating the text about
it in a separate paragraph.

https://gitlab.gnome.org/GNOME/glib/merge_requests/348
2018-09-24 16:34:53 +02:00
Debarshi Ray
30ccd6f01b docs: Use the correct terminology for g_array_free
GArray uses the term clear_func (eg., g_array_set_clear_func), while
element_free_func comes from GPtrArray.

https://gitlab.gnome.org/GNOME/glib/merge_requests/348
2018-09-24 16:34:49 +02:00
Xavier Claessens
8391219e4c Meson: Run in TAP mode installed tests that support it 2018-09-23 13:44:15 -04:00
Xavier Claessens
96fafcfe92 Meson: Fix missing files when installing tests
Closes #1527
2018-09-21 08:45:02 -04:00
Will Thompson
63f8294c45
gkeyfile: remain usable after g_key_file_free()
Previously, in the case where 'kf' has more than one ref, calling
g_key_file_free(kf) would break it. For example, calling
g_key_file_has_key(kf, ...) would hit the following assertion:

    g_hash_table_lookup: assertion 'hash_table != NULL' failed

This is because g_key_file_free() calls g_key_file_clear() which sets
self->groups and other fields to NULL; most lookup functions assume
these fields are non-NULL.

One fix would be to call g_key_file_init() right after
g_key_file_clear() in g_key_file_free(). However, in the case where
there are no other refs to the keyfile, this would mean allocating
many new hash tables which will be immediately destroyed when
g_key_file_unref() removes the last ref. Instead, inline the unref, and
re-initialize the internal state when the keyfile is still alive.
2018-09-20 17:04:00 +01:00
Mikhail Fludkov
1f6db2a5c5 glib/gcharset: fix leaking g_get_language_names_with_category 2018-09-20 16:08:19 +02:00
Руслан Ижбулатов
b9f91437bb Fudge glib fileutils test to pass on Windows
1) Creating a directory with 0666 does not prevent
traversal on Windows (ACL determines the possibility
of traversal, and Windows mkdir() does not translate
permission bits into ACL). Don't do the traversal check on Windows.

2) Creating a file with 0555 also isn't translated into
read-only ACL, Windows sets the read-only attribute instead,
which blocks all changes, including changes to file times.
Add the write permissions on Windows before changing file times.
2018-09-18 12:45:06 +00:00
Руслан Ижбулатов
d3d6ef60c6 W32: drop _wstat64(), get stat data manually
It turns out that UCRT (which is the C runtime that Visual Studio
uses by default these days) quietly changed the semantics for
stat() functions and its variants. Previously they provided data
for the symlink (if the file queried was a symlink), now they
provide data for the target of the symlink.

glib used to call _wstat64() to get certain stat-ish data about
files, such as st_dev, since it was deemed that computing that
data in glib using custom code would be pointless, as _wstat64()
worked just fine.

With UCRT this is no longer true. This commit drops _wstat64() in
favour of a bunch of custom calls that populate the stat buffer
manually. This way glib correctly gets information about a symlink,
not its target.

The _fstat64() call is still being used, as it does not suffer
from this problem and thus remains untouched.
2018-09-18 12:45:05 +00:00
Hans Petter Jansson
171f698ead ghash: Simplify g_hash_table_set_shift()
Even if we're using a prime modulo for the initial probe, our table is
power-of-two-sized, meaning we can set the mask simply by subtracting one
from the size.
2018-09-17 16:17:10 +02:00
Hans Petter Jansson
0dee62973c ghash: Fix poor performance with densely populated keyspaces
Sequential integers would be densely packed in the table, leaving the
high-index buckets unused and causing abnormally long probes for many
operations. This was especially noticeable with failed lookups and
when "aging" the table by repeatedly inserting and removing integers
from a narrow range using g_direct_hash() as the hashing function.

The solution is to multiply the hash by a small prime before applying
the modulo. The compiler optimizes this to a few left shifts and adds, so
the constant overhead is small, and the entries will be spread out,
yielding a lower average probe count.
2018-09-17 15:28:11 +02:00
Руслан Ижбулатов
256e741248 W32: tighten access rights requested to read symlink
According to
http://blog.kalmbach-software.de/2008/02/28/howto-correctly-read-reparse-data-in-vista/
we only need FILE_READ_EA, and should also use wider share flags.
2018-09-12 14:35:14 +00:00
Руслан Ижбулатов
a86eb1a8b6 W32: test the private path-stripping function 2018-09-12 14:35:13 +00:00
Руслан Ижбулатов
05fdd09740 W32: Don't always strip path prefixes
Extended path prefix looks like "\\?\",
and NT object path prefix looks like "\??\".
Strip them only if they are followed by a character
(any character) and a colon (:), indicating that
it's a DOS path with a drive.
Otherwise stripping such prefix might result in a patch
that looks like a relative path.

For example, "\\?\Volume{GUID}\" becomes "Volume{GUID}\",
which is a valid directory name.

Currently it's up to the user to make sense of such paths.
2018-09-12 14:35:09 +00:00
Emmanuele Bassi
86ab6ffa8d Merge branch '303-list-store-tests' into 'master'
Add more GListStore/GListModel tests

See merge request GNOME/glib!304
2018-09-05 11:11:58 +00:00
Philip Withnall
d2f412590e Merge branch 'wip/gtimeval-document-year-2038-problem' into 'master'
Document that GTimeVal is subject to the year 2038 problem on 32-bit systems

See merge request GNOME/glib!302
2018-09-05 10:55:43 +00:00
Philip Withnall
dfa2a4ae75 gtestutils: Print non-matching stderr/stdout output on trap failure
When running a test as a subprocess and matching its output, it’s very
annoying for GLib to tell you that the output didn’t match your pattern,
*but not actually say what the output was*. Fix that.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-09-05 11:25:03 +01:00
Emmanuele Bassi
515c39b0a9 Merge branch '1493-dtrace-consts' into 'master'
dtrace: Add missing const attributes to types in glib_probes.d

See merge request GNOME/glib!272
2018-09-05 10:13:14 +00:00
Emmanuele Bassi
3da4314205 Merge branch 'hash-table-tests' into 'master'
tests: Add more tests to finish branch coverage of GHashTable

See merge request GNOME/glib!289
2018-09-05 10:12:07 +00:00
Philip Withnall
98f326a020 Merge branch 'wip/otte/fallthrough' into 'master'
Add G_GNUC_FALLTHROUGH for __attribute__(fallthrough))

See merge request GNOME/glib!296
2018-09-04 22:06:26 +00:00
Benjamin Otte
3aff811d13 Use G_GNUC_FALLTHROUGH where appropriate 2018-09-04 20:24:25 +02:00
Benjamin Otte
95477a4e35 macros: Add G_GNUC_FALLTHROUGH
Expands to the GNU C fallthrough statement attribute if the compiler is gcc.
This allows declaring case statement to explicitly fall through in switch
statements. To enable this feature, use -Wimplicit-fallthrough during
compilation.
2018-09-04 20:24:21 +02:00
Iain Lane
68a4e273b4 Document that GTimeVal is subject to the year 2038 problem on 32-bit systems
It might not be immediately obvious that this is the case. Let's record
it in the description of `GTimeVal` itself and also in
`g_time_val_from_iso8601`.

We also drop an incorrect statement in the documentation for
`g_time_val_from_iso8601` stating that years up to 3000 were supported;
this is also not true for the same reason.

Related: #1509
2018-09-04 11:15:25 +01:00
Iain Lane
f697f6aa08 tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal
On 32 bit systems, the size of a long might be the same as the size of
an int. In that case, we won't be able to get an overflow when
converting from a GTimeVal to a time_t. Skip the test for this in that
case.

Closes #1509
2018-09-04 10:31:52 +01:00
Philip Withnall
d3656705fa Merge branch 'default-tls-database' into 'master'
gtlsbackend: add support for setting the default TLS database

Closes glib-networking#35

See merge request GNOME/glib!273
2018-09-03 13:22:39 +00:00
Philip Withnall
17ae9f36da Merge branch 'O_CLOEXEC' into 'master'
gspawn: Fix build on systems without O_CLOEXEC

See merge request GNOME/glib!286
2018-09-03 11:51:06 +00:00
Matthew Waters
6545e7558c gversionmacros: add version macros for GLib 2.60 2018-09-03 13:55:57 +10:00
Xavier Claessens
b2375471cc Merge branch '1313-config-cleanups' into 'master'
More config.h fixups for Meson

Closes #1313

See merge request GNOME/glib!283
2018-08-31 12:56:26 +00:00
Philip Withnall
0e5f9aa143 tests: Add more tests to finish branch coverage of GHashTable
Test a few situations where NULL values for optional out parameters
weren’t being tested. This takes the branch coverage of GHashTable up to
100% (ignoring g_return_if_fail() branches).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:46:48 +01:00
Philip Withnall
8dc8b33dfa ghash: Clear out arguments to NULL in g_hash_table_lookup_extended()
If the given key is not found, clear the orig_key and value arguments to
NULL as well as returning FALSE. Then the caller can unconditionally
check them.

This makes the behaviour of g_hash_table_lookup_extended() consistent
with g_hash_table_steal_extended().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:46:48 +01:00
Philip Withnall
41a3951c8f Merge branch 'simplify-alloca-checks' into 'master'
build: simplify alloca checks. See #1313

See merge request GNOME/glib!268
2018-08-31 10:45:29 +00:00
Philip Withnall
eeadd57a14 glib: Remove remaining references to __int64
This is a follow-up to 7e821441c4 and
e154e3325e removing some remaining
references to __int64 which are no longer necessary.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:41:12 +01:00
Ryan Schmidt
769b9a9c37 gspawn: Fix build on systems without O_CLOEXEC
Fixes typo introduced in 4afe429d7c.

See https://gitlab.gnome.org/GNOME/glib/issues/1488
2018-08-30 18:08:58 -05:00
Philip Withnall
297941e049 Merge branch 'ossfuzz-9805-variant-parser-overflow' into 'master'
gvariant: Fix more bounds checking in GVariant text format parser

See merge request GNOME/glib!239
2018-08-27 10:14:32 +00:00
Philip Withnall
3cafd7f266 Merge branch 'wip/chergert/garray-bail' into 'master'
garray: add overflow checks before expanding array

See merge request GNOME/glib!195
2018-08-27 10:09:58 +00:00
Philip Withnall
41cc3850ff dtrace: Add missing const attributes to types in glib_probes.d
This eliminates some ‘discards const qualifier’ warnings when compiling
on Solaris with --enable-dtrace.

See the log files in
https://gitlab.gnome.org/GNOME/glib/issues/1493#note_299037.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-25 23:59:45 +01:00
Christoph Reiter
11fcc2f1ac build: simplify alloca checks. See #1313
The goal of this commit is to reduce differences between the autotools and meson build.

With autotools AC_FUNC_ALLOCA was used which defines HAVE_ALLOCA_H, HAVE_ALLOCA,
C_ALLOCA. meson tried to replicate that with has_function() but alloca can be a macro
and and is named _alloca under Windows. Since we require a working alloca anyway
and only need to know if the header exists replace AC_FUNC_ALLOCA with a simple
AC_CHECK_HEADERS.

There is still one user of HAVE_ALLOCA in the embedded gnulib, but since alloca is
always provided through galloca.h just force define HAVE_ALLOCA there and add a comment.

The docs were mentioning alloca as an example for cross compiling. Since that variable no
longer exists now replace it with another one.
2018-08-24 10:57:10 +02:00
Simon McVittie
ec4da774e5 Merge branch '1492-cast-function-type-warning' into 'master'
glist: Mention -Wcast-function-type problems with g_*list_copy_deep()

Closes #1492

See merge request GNOME/glib!253
2018-08-23 09:25:36 +00:00
Philip Withnall
2e9c31af11 gmem: Only evaluate pointer argument to g_clear_pointer() once
The new typeof() macro version of g_clear_pointer() was evaluating its
pointer argument more than once, meaning any side effects would be
evaluated multiple times.

The existing (other) macro version of g_clear_pointer() was evaluating
its argument exactly once. This mismatch could have confused people or
lead to subtle bugs.

See https://gitlab.gnome.org/GNOME/glib/issues/1494.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-22 14:47:52 +01:00
Emmanuele Bassi
9a72ebe016 Merge branch '1494-clear-pointer-docs' into 'master'
gmem: Clarify calling convention behaviour of g_clear_pointer() in docs

Closes #1494

See merge request GNOME/glib!258
2018-08-22 11:22:58 +00:00
Philip Withnall
2bd09d56a2 Merge branch 'wip/sadiq/fixes' into 'master'
grefstring: Avoid an unnecessary NUL assignment

See merge request GNOME/glib!206
2018-08-22 11:21:23 +00:00
Emmanuele Bassi
c1d74052f5 Merge branch '1448-g-error-secretly-doesnt-abort' into 'master'
gmessages: Clarify documentation about aborting on fatal log levels

Closes #1448

See merge request GNOME/glib!254
2018-08-22 11:18:44 +00:00
Philip Withnall
c849a4ddd3 glib: Drop G_GNUC_MALLOC usage from various other allocation functions
These functions may be OK to leave the G_GNUC_MALLOC attribute on,
because the only valid pointers in the storage areas they return are,
themselves, new pointers.

However, it’s a lot easier to remove the attributes now than to try and
diagnose miscompilations in future. The performance impact of this is
likely to be unmeasurable. If there are performance problems caused by
this, then they can be profiled and fixed case-by-case in future,
bearing in mind the possibility for miscompilation if G_GNUC_MALLOC is
readded.

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

https://gitlab.gnome.org/GNOME/glib/issues/1465
2018-08-22 11:18:02 +01:00
Philip Withnall
082730fc3e glib: Drop G_GNUC_MALLOC usage from various allocation functions
These are our most critically incorrect uses of G_GNUC_MALLOC. See the
previous commit for details.

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

https://gitlab.gnome.org/GNOME/glib/issues/1465
2018-08-22 11:18:02 +01:00
Philip Withnall
c879f50f8a docs: Update the documentation for G_GNUC_MALLOC to reflect recent GCC
Thanks to some great investigation by Benjamin Moody, it’s clear that
our documentation and usage of G_GNUC_MALLOC has fallen behind GCC’s
interpretation of the malloc attribute, meaning that recent versions of
GCC could miscompile code which uses G_GNUC_MALLOC incorrectly.

Update the documentation of G_GNUC_MALLOC to match the current GCC
documentation (for GCC 8.2). Following commits will drop our use of
G_GNUC_MALLOC from inappropriate functions.

Specifically, the change in GCC’s interpretation of the malloc attribute
which could cause miscompilation is that returned storage areas are now
assumed to not contain valid pointers — so realloc() cannot have the
malloc attribute, and neither can a function which returns a newly
allocated structure with fields initialised to other pointers.

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

https://gitlab.gnome.org/GNOME/glib/issues/1465
2018-08-22 11:18:02 +01:00
Philip Withnall
a0456f9c96 gmessages: Clarify documentation about aborting on fatal log levels
Clarify that we actually raise SIGTRAP rather than calling abort(). We
haven’t called abort() since about 2011, when commit
a04efe6afb changed the logic to use
SIGTRAP to make it possible to skip past fatal log messages in the
debugger if they weren’t relevant to the problem being debugged.

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

https://gitlab.gnome.org/GNOME/glib/issues/1448
2018-08-22 10:37:15 +01:00
Philip Withnall
965bc6d857 gmem: Clarify calling convention behaviour of g_clear_pointer() in docs
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1494
2018-08-22 10:28:47 +01:00
Christoph Reiter
63d3311c26 gstdio: use _stat64 for GStatBuf on 64bit mingw. Fixes #1476
The size of stat depends on various macros on Windows which leads to
the problem of size mismatches when glib is built with a different configuration
than a program using it.

For example the autotools build defaults to _FILE_OFFSET_BITS=64 and a program
not defining  _FILE_OFFSET_BITS will allocate a too small struct on the stack,
leading to stack corruption when glib writes to it.

To make the size the user sees always match the default mingw build define GStatBuf
as _stat64 (same as _FILE_OFFSET_BITS=64) under mingw+64bit.
2018-08-20 12:40:21 +02:00
Philip Withnall
282ad30c0c gslist: Fix a minor documentation syntax problem
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-20 11:00:54 +01:00
Philip Withnall
e81f4c2ace glist: Mention -Wcast-function-type problems with g_*list_copy_deep()
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1492
2018-08-20 11:00:29 +01:00
Matthias Clasen
3664b017e3 Merge branch '1488-o-cloexec-again' into 'master'
gspawn: Use fcntl() to work around systems which don’t support O_CLOEXEC

Closes #1488

See merge request GNOME/glib!242
2018-08-16 12:31:27 +00:00
Philip Withnall
b1bfebc61c tests: Explicitly set TZ=UTC for g_time_val_from_iso8601() testing
Some of the test vectors don’t specify a timezone, so the local one is
used; the comparisons to the expected results (which are in UTC) then
fail.

See discussion in
https://gitlab.gnome.org/GNOME/glib/merge_requests/225.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-11 22:00:52 +01:00
Philip Withnall
4afe429d7c gspawn: Use fcntl() to work around systems which don’t support O_CLOEXEC
Somehow, we are still limping along with partial support for OS X
<10.7.

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

https://gitlab.gnome.org/GNOME/glib/issues/1488
2018-08-11 21:52:17 +01:00
Philip Withnall
8c844291b7 gtimer: Ensure arithmetic is correctly signed for ISO 8601 parsing
When calculating the value of a timezone offset, ensure that any offsets
done with negative numbers are done in a signed integer.

oss-fuzz#9815

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-10 10:43:37 +01:00
Philip Withnall
a9108f8bfd gvariant: Fix more bounds checking in GVariant text format parser
token_stream_prepare() was over-reading at the start of bytestring
literals (`b'blah'`).

Add tests for that, and for some other situations regarding bytestring
literal parsing, in order to try and get full branch coverage of that
bit of code.

oss-fuzz#9805

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-10 10:30:13 +01:00
Philip Withnall
10ee7301e8 gvariant: Fix bounds checking in GVariant text format parser
The token_stream_peek() functions were not doing any bounds checking, so
could potentially read 1 byte off the end of the input blob. This was
never noticed, since the input stream is almost always a nul-terminated
string. However, g_variant_parse() does allow non-nul-terminated strings
to be used with a @limit parameter, and the bugs become apparent under
valgrind if that parameter is used.

This includes modifications to the test cases to cover the
non-nul-terminated case.

Spotted by ossfuzz.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-09 01:08:46 +01:00
Emmanuele Bassi
291bb0c584 Merge branch '1433-rename-timezones-in-tests' into 'master'
tests: Don’t use a potentially-existent timezone in a test for failure

Closes #1433

See merge request GNOME/glib!213
2018-08-08 22:31:07 +00:00
Xavier Claessens
0498b43489 Merge branch '1446-g_test_init-docs' into 'master'
gtestutils: Mention G_DISABLE_ASSERT in documentation for g_test_init()

Closes #1446

See merge request GNOME/glib!212
2018-08-07 14:50:53 +00:00
Xavier Claessens
ba30f45d9a Merge branch 'timer-tests' into 'master'
Minor additions to gtimer.c tests

See merge request GNOME/glib!231
2018-08-07 14:43:43 +00:00
Philip Withnall
83c79eaf24 Merge branch 'smcv/glib-xfail'
Closes #1474

See merge request GNOME/glib!221
2018-08-07 12:24:16 +01:00
Simon McVittie
b8d751af3e testing: Exercise TAP output
(Tweaked by Philip Withnall <withnall@endlessm.com> to fix some minor
leaks, code formatting, and add a test comment.)

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-07 12:20:37 +01:00
Emmanuele Bassi
9ce18521aa Merge branch '1475-atomic-casts' into 'master'
tests: Fix a -Wbad-function-cast warning in the atomic tests

Closes #1475

See merge request GNOME/glib!223
2018-08-07 10:06:04 +00:00
Philip Withnall
6104e63ec4 tests: Improve branch coverage when testing g_time_val_add()
While I’m here…

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-07 11:03:39 +01:00
Philip Withnall
725eb1c86b tests: Add test for overflow handling in g_time_val_to_iso8601()
While I’m here…

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-07 11:03:39 +01:00
Emmanuele Bassi
7458defa9a Merge branch 'ossfuzz-9673-bookmark-date-overflow' into 'master'
gtimer: Add overflow checks to g_time_val_from_iso8601()

See merge request GNOME/glib!225
2018-08-07 09:57:21 +00:00
Philip Withnall
e5d9eca334 Merge branch 'gbytes-compare-docs' into 'master'
Fix up g_bytes_compare() documentation

See merge request GNOME/glib!229
2018-08-06 18:00:45 +00:00
Philip Withnall
2ab7fd2951 tests: Add more ISO 8601 parser tests
These come from looking at the code coverage data. We should now have
full branch coverage of the ISO 8601 parser.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
fdccf5ff34 gtimer: Drop support for negative years from g_time_val_from_iso8601()
It never worked; we’ve always parsed the year with strtoul() (unsigned).
While negative years are supported by the ISO 8601 standard, they can
only be used by mutual agreement of the two parties interchanging data.
Moreover, they are not supported by GTimeVal, which is what we’re
filling with the results.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
cefa66eb76 gtimer: Add overflow checks to g_time_val_from_iso8601()
The code was previously doing a few bits of arithmetic without checking
whether they would overflow, and hence not validating the date/time it
was parsing very strictly.

The parser is now not 100% strict, but should avoid any arithmetic
overflows which would cause an invalid result to be returned even though
g_time_val_from_iso8601() had returned TRUE.

oss-fuzz#9673

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
b1fffbffbf gtimer: Document that g_time_val_from_iso8601() drops whitespace
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
4eca2ac0ee tests: Add an overflow test for bookmark file dates
oss-fuzz#9673

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:27 +01:00
Philip Withnall
2860d4b50e gbookmarkfile: Fix some more minor leaks when metadata elements are repeated
oss-fuzz#9723

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 13:36:21 +01:00
Sebastian Dröge
a81b925d98 Fix up g_bytes_compare() documentation
It was declaring the opposite of what the function was actually doing,
and what every other comparison function is doing.
2018-08-06 15:20:02 +03:00
Simon McVittie
54a5f37f12 g_test_run: Document g_test_incomplete's similarity to g_test_skip
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:33:52 +01:00
Simon McVittie
0a180bb51b testing: Assert that test-case results are combined correctly
This repurposes the existing skip-all test as "combining", since it
is no longer entirely about runs where every test-case was skipped.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:30:10 +01:00
Simon McVittie
bbefa73997 testutils: Treat incomplete tests more like skipped tests
If a test is marked with g_test_incomplete(), then it is expected to
fail, so when it fails the test executable should still exit 0
(or possibly 77, if all tests are either skipped or incomplete).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:28:21 +01:00
Simon McVittie
ba3b442152 testing: Use g_assert_true(), which is preferred for unit tests
In the test for the unit testing framework, we might as well have
exemplary behaviour. Leave behind a single call to g_assert (TRUE)
just to prove that it still works.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:44:51 +01:00
Simon McVittie
ffe0402e02 testing: Assert that skipped tests cause g_test_failed()
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:42:57 +01:00
Simon McVittie
49a877764d testing: Clarify why incomplete tests cause g_test_failed()
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:42:38 +01:00
Simon McVittie
7cc5565e7c testutils: Correctly print incomplete tests as "not ok # TODO"
The TAP specification says that failing tests that are currently
expected to fail (like Automake's XFAIL) are to be reported as
"not ok", with that failure ignored as a result of the TODO
directive, with this example:

    not ok 3 - infinite loop # TODO halting problem unsolved

A test reported as "ok # TODO" indicates that something that is
expected to fail has unexpectedly succeeded, similar to Automake's
XPASS.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:20:59 +01:00
Philip Withnall
21d1797a4f tests: Fix a -Wbad-function-cast warning in the atomic tests
Assigning the gpointer return value from g_atomic_pointer_get() to a
gsize variable was not making -Wbad-function-cast happy. Assign to an
intermediate gpointer variable and then cast that instead.

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

https://gitlab.gnome.org/GNOME/glib/issues/1475
2018-08-03 11:08:26 +01:00
Simon McVittie
cc9cfc75fc date test: Use g_test_skip(), not g_test_incomplete()
g_test_skip() is appropriate for tests that can't run due to missing
functionality on the host system, whereas g_test_incomplete() is
for expected-to-fail tests for unimplemented functionality in the
code under test.

See also https://bugzilla.gnome.org/show_bug.cgi?id=793635 and
commit 5459b345.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-02 17:57:46 +01:00
Philip Withnall
71b0123845 Merge branch 'issue-1467' into 'master'
Drop a questionable test from the refstring suite

Closes #1467

See merge request GNOME/glib!218
2018-08-02 11:44:17 +00:00
Emmanuele Bassi
5e64ee3af7 Drop a questionable test from the refstring suite
Testing that an interned string is released once its last reference is
dropped is not possible without a hook into the interning machinery;
just checking that the returned pointer for the same string is going to
be different after the last release() is not guaranteed to work, as the
systema allocator is perfectly within its rights to recycle pointers, as
long as they are unique while valid.

Closes #1467
2018-08-02 12:21:38 +01:00
Philip Withnall
6c041ff283 gbookmarkfile: Fix some minor leaks when metadata elements are repeated
oss-fuzz#9674

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-02 11:20:15 +01:00
Philip Withnall
b2249bf33c tests: Don’t use a potentially-existent timezone in a test for failure
When checking that the timezone code falls back to UTC if a zone is
unknown, don’t use ‘PST’, because that can actually exist on some
systems.

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

https://gitlab.gnome.org/GNOME/glib/issues/1433
2018-07-31 19:54:56 +01:00
Philip Withnall
17df5c0b26 gtestutils: Mention G_DISABLE_ASSERT in documentation for g_test_init()
g_test_init() bails if G_DISABLE_ASSERT is defined. Mention that. This
is a follow-up to
https://gitlab.gnome.org/GNOME/glib/merge_requests/174.

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

https://gitlab.gnome.org/GNOME/glib/issues/1446
2018-07-31 19:49:37 +01:00
Philip Withnall
ca0110c34d build: Conditionally add spawn and IO channel without using EXTRA_ prefix
See previous commit; same reasoning behind the commit, except that these
sources weren’t (yet) causing `make distcheck` to fail.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-31 18:52:37 +01:00
Philip Withnall
862fe11f90 build: Conditionally add gwin32.c to sources without using EXTRA_ prefix
Instead of messing around with EXTRA_*_SOURCES and manually handling .lo
files, why not just add gwin32.c to the GLib sources conditionally?

This will hopefully fix `make distcheck` failing due to gwin32.Plo not
being generated in the sub-builddir≠srcdir stage, due to depcomp
inexplicably not generating it. (Note that it is correctly generated in
non-distcheck builds.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-31 18:52:37 +01:00
Philip Withnall
83c69fa77d Merge branch '1035-bookmarks-state-machine' into 'master'
gbookmarkfile: Fix error reporting with unexpected nesting of elements

Closes #1035

See merge request GNOME/glib!207
2018-07-30 22:50:52 +00:00
Matthias Clasen
dbf9959d15 Merge branch '1436-docs-muckery' into 'master'
Fix various documentation issues and man page issues with autotools

See merge request GNOME/glib!209
2018-07-30 22:24:26 +00:00
Philip Withnall
376234f9b2 gbookmarkfile: Fix error reporting with unexpected nesting of elements
The parser state machine for bookmark files did not handle unexpected
nesting of elements, such as a <bookmark> element inside a <title>
element — it would print a critical warning rather than returning a
GError.

Fix that, and add various unit tests for it. The set of tests includes
various other general markup tests as provided by Jussi Judin.

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

https://gitlab.gnome.org/GNOME/glib/issues/1035
2018-07-30 21:59:26 +01:00
Philip Withnall
b4734d3b5b docs: Add some more backtick quotation
That should format these character classes correctly in the
documentation, and prevent them being interpreted by gtk-doc as (broken)
Markdown hyperlinks.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:22 +01:00
Philip Withnall
fba8d7a48a docs: Fix case of a type used in a gtk-doc comment
This fixes the automatic linking of that type.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:03 +01:00
Philip Withnall
4cd7f769ae gconvert: Adjust an argument name in the header to match the source
This fixes a gtk-doc complaint about the argument name not matching
what’s used in the gtk-doc comment.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:14:16 +01:00
Philip Withnall
0e0b18e0cd docs: Fix a minor syntax error in a documentation comment
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:13:28 +01:00
Philip Withnall
2a69cdb1cd build: Stop distributing generated files in autotools tarballs
It is a bug if we distribute files which are generated at build time —
they should be built on the machine which is compiling GLib, not be
shipped in the tarball.

This brings the autotools-generated tarball in line with the
ninja-generated one, with the exception of man pages and gtk-doc HTML
output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:58:24 +01:00
Philip Withnall
47dcbd318f build: Remove a pointless intermediate variable in glib/Makefile.am
This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:47:15 +01:00
Matthias Clasen
4127c84c3a Merge branch '1461-bookmarks-nullptr' into 'master'
gmarkup: Fix crash in error handling path for closing elements

Closes #1461

See merge request GNOME/glib!205
2018-07-30 18:44:48 +00:00
Matthias Clasen
f424a0c2d3 Merge branch '1462-bookmark-overflow' into 'master'
gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths

Closes #1462

See merge request GNOME/glib!204
2018-07-30 17:56:21 +00:00
Mohammed Sadiq
f0ce956f73 grefstring: Avoid an unnecessary NUL assignment
The duped string is already NUL-terminated.
There is no need to do it again.
2018-07-30 23:06:23 +05:30
Philip Withnall
fccef3cc82 gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.

Includes a test case, courtesy of pdknsk.

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

https://gitlab.gnome.org/GNOME/glib/issues/1461
2018-07-30 18:33:39 +01:00
Philip Withnall
cec7170540 gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths
When formatting the error messages for markup parsing errors, the parser
was unconditionally reading a UTF-8 character from the input buffer —
but the buffer might end with a partial code sequence, resulting in
reading off the end of the buffer by up to three bytes.

Fix this and add a test case, courtesy of pdknsk.

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

https://gitlab.gnome.org/GNOME/glib/issues/1462
2018-07-30 18:10:25 +01:00
Philip Withnall
ef1d24974d gasyncqueue: Add missing precondition to g_async_queue_timeout_pop()
And g_async_queue_timeout_pop_unlocked().

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

https://gitlab.gnome.org/GNOME/glib/issues/1459
2018-07-30 17:18:03 +01:00
Mohammed Sadiq
e91da3fc77 grcbox: Fix typo in doc 2018-07-30 12:39:27 +05:30
Christian Hergert
0c7dc75844 garray: add overflow checks before expanding array
We should bail when we detect that adding a number of items to an array
would cause it to overflow. Since we can't change to using gsize for ABI
reasons we should protect the integrity of the process even if that means
crashing.
2018-07-23 21:05:11 -07:00
Rico Tzschichholz
c79c234c35 unicode: Update to unicode 11.0.0
Fixes https://gitlab.gnome.org/GNOME/glib/issues/1407
2018-07-18 14:26:47 +02:00
Philip Withnall
532c45b5ce tests: Skip some more date tests if translations are not installed
These tests will work if the glibc translations are up to date, or if
the GLib translations are installed and up to date; but not if neither
are in place.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

https://gitlab.gnome.org/GNOME/glib/issues/1447
2018-07-17 20:51:47 +02:00
Philip Withnall
27eb6b4290 tests: Compare month names case-insensitively in date tests
This has the same rationale as the corresponding change to the gdatetime
tests; commit 9cadb90b35.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

https://gitlab.gnome.org/GNOME/glib/issues/1447
2018-07-17 20:51:47 +02:00
Philip Withnall
e487df31e1 gvariant: Fix some memory leaks on error paths
Coverity CID: #1393955
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2018-07-17 12:14:36 +02:00
Philip Withnall
7f55c768ce Merge branch '1444-install-tests' into 'master'
Install unit tests

Closes #1444

See merge request GNOME/glib!183
2018-07-17 09:51:12 +00:00
Philip Withnall
16c6a73586 Merge branch 'add-g-has-typeof-1440' into 'master'
gmacros: Add new private g_has_typeof to abstract __typeof__ checks

Closes #1440

See merge request GNOME/glib!172
2018-07-17 09:27:12 +00:00
Philip Withnall
4dc6a01241 Merge branch 'type-safe-g-clear-pointer-1425' into 'master'
Type safe g clear pointer 1425

Closes #1425

See merge request GNOME/glib!177
2018-07-17 09:23:29 +00:00
Xavier Claessens
1bba3276bb Meson: Install glib tests
Fixes: #1444.
2018-07-16 15:36:20 -04:00
Xavier Claessens
a84cbf1434 Meson: Group all glib tests into a single dict 2018-07-16 15:33:58 -04:00
Xavier Claessens
5f3db543f8 Meson: Remove hack that got fixed a while ago 2018-07-16 15:04:03 -04:00
Xavier Claessens
f456e311cd Meson: Use environment() for test_env 2018-07-16 15:04:03 -04:00
Iain Lane
4c621fb7ee gmacros: Add new private g_has_typeof to abstract __typeof__ checks
We have this same check in a few places now, and we might as well
abstract it out.

Fixes #1440.
2018-07-16 15:59:44 +01:00