| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Even if the address is correct, it's far more convenient to have a link
to a website.
https://bugzilla.gnome.org/show_bug.cgi?id=776586
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=776586
|
|
|
|
|
|
|
|
|
|
|
| |
Harmonize a little the license headers. In most of the license headers
in GLib, it is "this library".
It is also what is explained at:
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4
"How to Apply These Terms to Your New Libraries"
https://bugzilla.gnome.org/show_bug.cgi?id=776586
|
|
|
|
|
|
|
|
|
|
|
| |
Harmonize a little the license headers. In most of the license headers
in GLib, it is "This library".
It is also what is explained at:
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4
"How to Apply These Terms to Your New Libraries"
https://bugzilla.gnome.org/show_bug.cgi?id=776586
|
|
|
|
|
|
|
|
|
|
|
| |
Harmonize a little the license headers. In most of the license headers
in GLib, it is "This library".
It is also what is explained at:
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4
"How to Apply These Terms to Your New Libraries"
https://bugzilla.gnome.org/show_bug.cgi?id=776586
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When performing the verify and building the error string there were two
possibilities of an infinite loop. The first is the missing twos-complement
to unset the bit in the filtered flags. The second is the lack of handling
G_SUBPROCESS_FLAGS_NONE which can return a valid GFlagsValue (and cannot
unset the bit since the value is zero).
This walks all known values in the GSubprocessFlags type class and check
if they are set. This has the benefit that we don't call needless functions
which walk the same table as well as avoiding mutating values to build
the error string.
https://bugzilla.gnome.org/show_bug.cgi?id=775913
|
|
|
|
| |
Problem introduced in commit 442b7ce.
|
|
|
|
|
|
|
| |
Make g_resolver_lookup_by_name() and g_resolver_lookup_by_name_async()
error out when invalid hostnames are passed.
https://bugzilla.gnome.org/show_bug.cgi?id=772989
|
|
|
|
|
|
|
|
|
| |
When an invalid hostname is passed for connection, the
g_hostname_to_ascii() might fail when creating the request in
create_request(). Make sure that error is caught and reported rather
than passing "(null)" as the hostname of the site we want to connect to.
https://bugzilla.gnome.org/show_bug.cgi?id=772989
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=776198
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We kept seeing the glib testsuite hanging on our CI system in the
testcase for 642026. After some digging it turned out the jenkins slave
was misconfigured and its task limit was too low.
Add an assertion that the test thread has been created to more easily
spot this error condition as opposed to the test simply hanging.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=769672
|
|
|
|
|
|
|
|
|
| |
The tests defaultvalue, gdbus-peer and gdbus-unix-addresses will fail
without DBUS, so only run them in case we HAVE_DBUS_DAEMON.
Signed-off-by: Ingo Brückl <ib@wupperonline.de>
https://bugzilla.gnome.org/show_bug.cgi?id=767609
|
| |
|
|
|
|
|
|
|
|
| |
When we make Visual Studio 2013 the baseline Visual Studio version, we need to
the *.vs12.sourcefiles that are generated along the way so that 'make distcheck'
won't complain about the leftover files. This was not caught in GLib as we do
not yet require Visual Studio 2013, but we update this here as this module is
intended to be used in projects that support Visual Studio project builds.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
... when tty terminal emulators (such as mintty) are used. This support
is however for Vista and later, so use of such terminals should have
support for ANSI color codes in their outputs, even on Windows 7/8/8.1/
https://bugzilla.gnome.org/show_bug.cgi?id=775468
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=775765
|
|
|
|
|
| |
This fixes one of the assertions of the socket unit tests where
G_IO_ERROR_FAILED was returned instead of G_IO_ERROR_CONNECTION_CLOSED.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conditions for the same socket
WSAWaitForMultipleEvents() only returns for one of the waiting threads, and
that one might not even be the one waiting for the condition that changed. As
such, only let a single thread wait on the event and use a GCond for all other
threads.
With this it is possible to e.g. have an UDP socket that is written to from
one thread and read from in another thread on Win32 too. On POSIX systems this
was working before already.
https://bugzilla.gnome.org/show_bug.cgi?id=762283
|
|
|
|
|
|
| |
There is no systemd on Android.
https://bugzilla.gnome.org/show_bug.cgi?id=775621
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows 10 begins to support color output on the console using ANSI
codes, but a few extra steps are required for this support, so we cannot
just use isatty() and expect colors to work in the outputs.
Instead, we use still use isatty() from the Windows CRT, and then enable
ENABLE_VIRTUAL_TERMINAL_PROCESSING if it returns true.
Also make the invalid parameter handler shared between gmessages.c and
gspawn-win32-helper.c, since it is basically intended to be a no-op stub.
https://bugzilla.gnome.org/show_bug.cgi?id=775468
|
|
|
|
|
|
|
|
|
|
| |
Signed integer overflow is undefined behaviour: if a compiler
detects signed integer overflow, it is free to compile it to absolutely
anything.
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed integer overflow is undefined behaviour, which the undefined
behaviour sanitizer detects.
Previously, if the compiler had implemented this in the obvious way
(overflowing signed multiplication wraps around mod 2**32), we would
have incorrectly classified addresses where one octet was, for example,
(2**32 + 42) as valid IP addresses, by treating that octet as though
it was 42.
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
|
|
| |
bsearch() is defined to search for a non-null key, so we can't
search for NULL. The undefined behaviour sanitizer picks this up.
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
|
|
|
|
| |
-2LL<<34 is undefined, because left-shifting a negative number is
undefined (it was implementation-defined behaviour in C99, but
is formally undefined in C11). The undefined behaviour sanitizer
picks this up.
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc string.h declares memcpy() with attribute(nonnull(1,2)), causing
calls with NULL arguments to be treated as undefined behaviour.
This is consistent with ISO C99 and C11, which state that passing 0
to string functions as an array length does not remove the requirement
that the pointer to the array is a valid pointer.
gcc -fsanitize=undefined catches this while running OSTree's test suite.
Similarly, running the GLib test suite reports similar issues for
qsort(), memmove(), memcmp().
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
|
|
|
|
|
| |
UBSan considers left-shifting a negative number to be undefined
behaviour (per
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_081.html> it is
implementation-defined in C89, but according to
<https://llvm.org/bugs/show_bug.cgi?id=17490> it is undefined in C99).
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
| |
Check for termios.h is missing and passwords in the new gio tool
are echoed in the terminal consequently, which is really bad!
https://bugzilla.gnome.org/show_bug.cgi?id=775517
|
|
|
|
|
|
|
|
|
|
| |
_g_dbus_auth_mechanism_server_data_send may fail in which case
we would endup getting a NULL data. In this case we should not
try to encode the data and simply let the state machine to continue.
The auth mechanism will change internally to REJECTED so we just
need to continue the iteration.
https://bugzilla.gnome.org/show_bug.cgi?id=775309
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
global variables in SystemTap are shared between all SystemTap scripts;
so if scripts are loaded for two versions of GLib (for example, a stable
and a development version), those global variables will conflict.
Avoid that by including the soname’s version in the global variable
names.
https://bugzilla.gnome.org/show_bug.cgi?id=770646
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we cannot get Valgrind to automatically load this suppression file
for applications which link to GLib
(https://bugs.kde.org/show_bug.cgi?id=160905), we can at least install
it on systems in a shared directory, so that developers can use a
standardised (and up-to-date) suppressions file for GLib, rather than
rolling their own.
The file will typically be installed to:
/usr/share/glib-2.0/valgrind/glib.supp
Distributors: it is recommended that this suppression file be installed
as part of the development package for GLib in your distribution.
https://bugzilla.gnome.org/show_bug.cgi?id=666114
|
|
|
|
| |
We don't have libmount on Windows, so just make the entry for it blank.
|
|
|
|
|
|
|
|
| |
If we have an input parameter (or return value) we need to use (nullable).
However, if it is an (inout) or (out) parameter, (optional) is sufficient.
It looks like (nullable) could be used for everything according to the
Annotation documentation, but (optional) is more specific.
|
|
|
|
|
|
|
| |
This leak only happens when using G_DBUS_DEBUG=message or similar, but
it's nicer to be valgrind-clean even in these cases.
https://bugzilla.gnome.org/show_bug.cgi?id=736810
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=729730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GVariant documentation says you can assume that types of no more
than 32 bits may be assumed to be promoted to int by the usual
promotions. If we're going to document that, we should statically
assert that it's true, i.e. sizeof (int) >= sizeof (int32_t).
All reasonable modern platforms are either ILP32 (32-bit platforms),
LP64 (64-bit Linux, *BSD etc.), or LLP64 (64-bit Windows): there have
been ILP64 platforms in the past, but ILP64 has the compelling
disadvantage that {signed char, short, int} can't possibly provide
all of {int8_t, int16_t, int32_t} unless int is 32 bits long.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ISO C allows compilers to make enums smaller than int if their
enumerated values would all fit in the range of a smaller type.
In practice, I suspect that in relevant compilers, all enums whose
values fit in the range INT32_MIN to INT32_MAX (inclusive) are the same
size as int. ISO C allows compiler to break that assumption, but those
that do would break code that works fine in other compilers, making the
compiler look bad, for no significant benefit. I conjecture that such
compilers are not popular.
Let's statically assert that my assumption holds. If all goes well,
GLib will continue to compile on every relevant platform; if it
fails to compile on some platform as a result of this change, then
there are probably a lot of naive uses of enums that need auditing
for this assumption.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Allison Lortie
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=769745
|
|
|
|
|
|
|
| |
g_unix_mount_for segfaults for nonexistent paths. Return NULL if path
doesn't exist.
https://bugzilla.gnome.org/show_bug.cgi?id=772160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code assumes that int is exactly 32 bits, and that pointers
are either 4 or 8 bits, on platforms with __ATOMIC_SEQ_CST.
In practice this is going to be true.
A previous attempt at this assertion placed the G_STATIC_ASSERT
at the top level in gatomic.h, but that broke anjuta, which
redefined __unused__ at the time. These assertions are about the
platform/compiler ABI, so it's sufficient to check them once,
while compiling GLib itself; accordingly, move them to the
implementation.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps with static linking. When application statically links with
libgio, it needs to link against libmount explicitly. When it is
mentioned in Libs.private, build system can figure out with which extra
libs to link against with help of pkg-config.
This build failure is detected by Buildroot autobuilder:
http://autobuild.buildroot.net/results/fdf/fdf26abbed0014606a7788ce5d60828a0e871186
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=767952
|
|
|
|
| |
... around empty body in an 'else' statement
|
|
|
|
| |
... around empty body in an 'else' statement
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774368
|
|
|
|
|
|
|
|
|
|
|
| |
This includes phony targets for each dependency in the the generated
dependency file which allows building with `ninja` which doesn't like
the phony targets[1] but also allows silencing `make` errors similar to
gcc's -MP option.
[1] - https://github.com/ninja-build/ninja/issues/1184
https://bugzilla.gnome.org/show_bug.cgi?id=774368
|
|
|
|
|
|
|
|
|
|
|
| |
If g_socket_receive_message_with_timeout() is called with messages ==
NULL set the msg_control buffer to empty to not request the control
messages from recvmsg() at all.
This completely disables the control message processing and reduces
overhead, which might be critical at high packet rate.
https://bugzilla.gnome.org/show_bug.cgi?id=774520
|