Loading
Commits on Source 17
-
Philip Withnall authored
Previously it was mapped (as a default) to `G_IO_ERROR_FAILED`. It’s the error that macOS returns when trying to connect to a socket which is bound but not listened to. Linux returns `ECONNREFUSED` in this case. It’s helpful if they both map to the same `GIOError` value. This should fix the `/socket-client/connection-fail` test on macOS, which is currently [failing](https://gitlab.gnome.org/GNOME/glib/-/jobs/3970547 ) with: ``` # GLib-GIO-DEBUG: GSocketClient: Starting TCP connection attempt # GLib-GIO-DEBUG: GSocketClient: Connection attempt failed: Can't assign requested address # GLib-GIO-DEBUG: GSocketClient: Starting new address enumeration # GLib-GIO-DEBUG: GSocketClient: Address enumeration completed (out of addresses) # GLib-GIO-DEBUG: GSocketClient: Address enumeration failed: (null) # GLib-GIO-DEBUG: GSocketClient: Connection failed: Could not connect to localhost: Can't assign requested address not ok /socket-client/connection-fail - GLib-GIO:ERROR:../gio/tests/gsocketclient-slow.c:231:test_connection_failed: assertion failed (local_error == (g-io-error-quark, 39)): Could not connect to localhost: Can't assign requested address (g-io-error-quark, 0) Bail out! ``` Signed-off-by:
Philip Withnall <pwithnall@gnome.org> See: #3184 Fixes: #3394
-
Michael Catanzaro authored
Backport !4111 “gioerror: Map EADDRNOTAVAIL to G_IO_ERROR_CONNECTION_REFUSED” to glib-2-80 See merge request GNOME/glib!4112
-
Benjamin Otte authored
This is a precautionary assert that will probably only trigger on 32bit OSes. But g_nearest_pow() can overflow.
-
Benjamin Otte authored
GByteArray is limited to 4GB in size and the current code silently overflows when that happens. Replace both load_contents() and load_contents_async() implementations with a version that uses realloc() and gsize to maintain the array.
-
Benjamin Otte authored
-
Benjamin Otte authored
The tests - one for sync, one for async - create a sparse file for this purpose, so this should be cheap on the fileystem. Of course, the test still allocates >4GB of memory for the data that it returns from g_file_load_contents(), I hope the CI test runners can deal with that.
-
Philip Withnall authored
They take too long to include in a normal test run. They’ll still be run in CI once a week as part of our scheduled slow test job. Signed-off-by:Philip Withnall <pwithnall@gnome.org>
-
Philip Withnall authored
This should test the limits of loading 4GB files on i386 platforms, such as the Hurd CI runner. On such platforms, `sizeof(size_t) == 4`. This should fix the compiler warning from https://gitlab.gnome.org/GNOME/glib/-/jobs/3989442 : ``` ../gio/tests/file.c:2931:51: error: left shift count >= width of type [-Werror=shift-count-overflow] 2931 | static const gsize testfile_4gb_size = ((gsize) 1 << 32) + (1 << 16); /* 4GB + a bit */ | ^~ cc1: all warnings being treated as errors ``` Signed-off-by:
Philip Withnall <pwithnall@gnome.org>
-
Michael Catanzaro authored
Backport !3373 and !4117 “Handle files >4GB in g_file_load_contents()“ to glib-2-80 See merge request GNOME/glib!4118
-
Alexander Kanavin authored
There is a meson option (gir_dir_prefix), but without being passed in here the files would always get installed into the default location (datadir). Signed-off-by:Alexander Kanavin <alex@linutronix.de>
-
Philip Withnall authored
libgirepository is not needed by most of the modules, but it is needed by the `g-ir-scanner` generated dumper program. If we don’t explicitly include the local version of it here, Meson will implicitly link against it anyway, and that might pull in a different version, or try to link against a half-built local version as the build ordering dependency tree won’t reflect this relationship. Signed-off-by:Philip Withnall <pwithnall@gnome.org> Fixes: #3401
-
Emmanuele Bassi authored
Backport !4020 and !4122: fixes to GIR install locations and build race fixes See merge request GNOME/glib!4124
-
Andy Holmes authored
The return value to `lookup_records()` methods is set as `transfer full` but the code path in `g_resolver_records_from_res_query()` doesn't sink the GVariant. Add the `g_variant_ref_sink()` call when prepending the record, so the list hold a full reference on each records. closes #3393
-
Andy Holmes authored
For each test expected to return valid DNS records, test that the record variants are not floating references. Also add an test which checks this explicitly for a simple TXT record.
-
Michael Catanzaro authored
Backport !4110 “gthreadedresolver: ref-sink returned records in lookup_records()” to glib-2-80 See merge request GNOME/glib!4141
-
Philip Withnall authored
Signed-off-by:Philip Withnall <pwithnall@gnome.org>
-
Jeremy Bícha authored