32080 Commits

Author SHA1 Message Date
Philip Withnall
723c28e116 Merge branch 'ghash_iter_overflow' into 'main'
ghash: Handle all table sizes in iterator

See merge request GNOME/glib!4756
2025-09-05 13:10:04 +00:00
Philip Withnall
16b92b3c9e Merge branch 'ghash_entry_is_big' into 'main'
ghash: Fix entry_is_big for CHERI architecture

See merge request GNOME/glib!4755
2025-09-05 13:07:51 +00:00
Philip Withnall
b1ad93eff2 Merge branch 'bookmark_escape' into 'main'
gbookmarkfile: Escape icon href and mime-type

See merge request GNOME/glib!4760
2025-09-05 13:07:24 +00:00
Philip Withnall
e33be08bda 2.86.0
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2.86.0
2025-09-05 13:42:14 +01:00
Philip Withnall
56136cb804 Merge branch 'Persian' into 'main'
po: Update Persian translation.

See merge request GNOME/glib!4772
2025-09-05 12:22:30 +00:00
Danial Behzadi
831c4f7f83 po: Update Persian translation. 2025-09-05 15:25:47 +03:30
Philip Withnall
20b023a287 Merge branch 'gmessages_win32_debug' into 'main'
gmessages: Fix win32_keep_fatal_message regression

See merge request GNOME/glib!4768
2025-09-05 08:57:03 +00:00
Philip Withnall
2b7346e088 Merge branch 'main' into 'main'
Update Georgian translation

See merge request GNOME/glib!4771
2025-09-05 08:51:10 +00:00
Philip Withnall
fad50ad4e2 Merge branch 'translation' into 'main'
Update Chinese translation

See merge request GNOME/glib!4770
2025-09-05 08:51:03 +00:00
NorwayFun
edc81fa803 Update ka.po 2025-09-04 12:34:17 +00:00
lumingzh
698ecdfc1a update Chinese translation 2025-09-04 17:47:56 +08:00
Michael Catanzaro
8a6f6b352e Merge branch 'typos' into 'main'
docs: Fix typos

See merge request GNOME/glib!4769
2025-09-03 16:37:07 -05:00
Tobias Stoeckmann
48bf508bc1 docs: Fix typos
Typos found with codespell
2025-09-03 21:47:11 +02:00
Tobias Stoeckmann
3d21160b85 docs: Fix typos in comments 2025-09-03 21:33:53 +02:00
Tobias Stoeckmann
19dce43557 gstring: Fix argument reference
The argument is named init, not data.
2025-09-03 21:33:35 +02:00
Tobias Stoeckmann
795ca50a98 gmessages: Fix win32_keep_fatal_message regression
The functionality of win32_keep_fatal_message was lost with commit
fb9df27776, which introduced the usage of
fputs instead of write. The write system call was wrapped with a macro
for Windows systems to keep fatal messages in an extra buffer.

For the record, the unused dowrite function was removed in commit
5400f4e128.

Reintroduce the functionality to fix this regression in a memory-safe
way.
2025-09-03 19:40:51 +02:00
Tobias Stoeckmann
b030663112 gmessages: Add static variables only if needed
The static variables win32_keep_fatal_message and fatal_msg_buf are only
used for Windows debug builds and those without G_WINAPI_ONLY_APP
defined.

These checks are already in place for consumer of fatal_msg_buf, so
extend their usage.
2025-09-03 19:37:38 +02:00
Philip Withnall
b9d2fa3cdc Merge branch 'solaris-faccessat' into 'main'
glocalfile: Disable faccessat()-based query_exists on Solaris

See merge request GNOME/glib!4767
2025-09-02 18:32:04 +00:00
Marco Trevisan
72a1b2a50b Merge branch 'girepository-null-pointer-dereference' into 'main'
girepository: Add an assertion to help scan-build

See merge request GNOME/glib!4765
2025-09-02 18:53:59 +02:00
Philip Withnall
5bc310bf9e girepository: Add an assertion to help scan-build
This helps scan-build not emit a ‘potential null pointer dereference’
error for calls to `require_internal()`:
```
Access to field 'message' results in a dereference of a null pointer (loaded from variable 'local_error')
```

See https://gitlab.gnome.org/GNOME/glib/-/jobs/5482526 for details of
the error.

I don’t think there is an actual null pointer dereference here.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-09-02 16:02:26 +01:00
Niveditha Rau
f607ae6511 glocalfile: Disable faccessat()-based query_exists on Solaris 2025-09-01 13:56:21 -07:00
Philip Withnall
813c615be4 Merge branch 'gmemorymonitorpsi-avoid-regex' into 'main'
gio: gmemorymonitorpsi: Replace GRegex with g_str_has_prefix()

See merge request GNOME/glib!4762
2025-08-30 13:31:39 +00:00
Kleis Auke Wolthuizen
e506d16efa gio: gmemorymonitorpsi: Replace GRegex with g_str_has_prefix()
Using g_str_has_prefix() and simple pointer arithmetic is easier and
more efficient.

No functional change.
2025-08-30 13:31:38 +00:00
Emmanuele Bassi
cb074a65c7 Merge branch 'gir-gio-unix-split' into 'main'
girepository: Remove backward compatibility introspection from Gio-2.0

Closes #3744

See merge request GNOME/glib!4761
2025-08-29 18:26:18 +01:00
Emmanuele Bassi
e13fe685cf docs: Fix links to GioUnix types
Now that Unix-specific types have been moved to the GioUnix, we need to
fix the various links in our documentation.
2025-08-29 18:00:50 +01:00
Emmanuele Bassi
45640dffa5 girepository: Load platform-specific GIO data
For backward compatibility, we automatically load the GioUnix or
GioWin32 namespaces if the Gio namespace has been required.

Also ensures that the platform-specific library is loaded in tests

Co-Authored-By: Marco Trevisan (Treviño) <mail@3v1n0.net>
2025-08-29 14:32:08 +02:00
Marco Trevisan (Treviño)
10366ac62f girepository: Add checks on prerequisites of gi_repository_require 2025-08-29 14:29:58 +02:00
Marco Trevisan (Treviño)
fd262e72f5 girepository: Fix indentation 2025-08-29 14:29:58 +02:00
Marco Trevisan (Treviño)
a1bc53aa98 girepository: Add test ensuring that platform specific methods are available 2025-08-29 14:29:33 +02:00
Emmanuele Bassi
db96cb45ce Remove backward compatibility introspection from Gio-2.0
The identifiers and types in Gio-2.0 that are used for backward
compatibility purposes in order to keep code importing Gio and using
platform-specific API are actually breaking the platform-specific
introspection data, because the introspection scanner favours types
found inside dependencies as opposed to types with the same name found
inside the current namespace.

In practice, the backward compatibility hack of keeping duplicate types
inside Gio-2.0 is effectively preventing people from using GioUnix-2.0
and GioWin32-2.0.

We cannot change the introspection scanner, because that could have
unforeseen results across the stack.

We cannot remove the symbols and bump the namespace version of Gio and
friends to 3.0, unless we keep generating known-to-be-broken 2.0
versions of all the namespaces. It also won't solve the issue of code
loading Gio without specifying a version, because that always imples
using the latest version of the namespace, which means backward
compatibility would still need an explicit opt in.

In practice, the only reasonable way forward is to break backward
compatibility, and remove the duplicate symbols and identifiers from
Gio-2.0, as we should have done in the first place.

Fixes: #3744
2025-08-29 14:02:44 +02:00
Marco Trevisan (Treviño)
8f25f70fc9 girepository: Always use internal functions in internal implementations
We are going to have a different logic in the public function so let's
just use the same code internally
2025-08-29 14:02:44 +02:00
Tobias Stoeckmann
f795a8a5de gbookmarkfile: Escape icon href and mime
If callers supply strings containing unescaped characters for icon href
or mime, then dumping the content can lead to corrupted files.
2025-08-28 22:43:02 +02:00
Philip Withnall
0a017b39c2 Merge branch 'update-sv-translation' into 'main'
Update Swedish translation

See merge request GNOME/glib!4758
2025-08-27 14:18:03 +00:00
Philip Withnall
fa46da5804 Merge branch 'piotrdrag/pl-translation-250825' into 'main'
Update Polish translation 250825

See merge request GNOME/glib!4754
2025-08-26 19:17:52 +00:00
Anders Jonsson
c0c00844ae Update Swedish translation 2025-08-26 21:11:21 +02:00
Tobias Stoeckmann
f8bda4d109 ghash: Fix signed integer overflow in g_hash_table_set_shift
Shifting 1 by 31 bits triggers a signed integer overflow. Use 1u
for unsigned data type to allow such operation.

Helps: #672
2025-08-26 18:25:54 +02:00
Tobias Stoeckmann
7367c518f1 ghash: Handle all table sizes in iterator
A table size of 2**31 cannot be represented in a gint. Adjust
RealIter to use a guint for its current position to support the largest
power of two possible for a hash table size.

This makes sure that g_hash_table_iter_next does not trigger a signed
integer overflow, which would eventually lead to an out of boundary
read.

With input by Philip Withnall.

Helps: #672
2025-08-26 18:25:51 +02:00
Marco Trevisan
1e7fab4065 Merge branch '3768-test-trap-subprocess-flags' into 'main'
gtestutils: Fix G_TEST_SUBPROCESS_INHERIT_STDIN in g_test_trap_subprocess()

Closes #3768

See merge request GNOME/glib!4757
2025-08-26 17:14:00 +02:00
Philip Withnall
2f737c4e79 gtestutils: Fix G_TEST_SUBPROCESS_INHERIT_STDIN in g_test_trap_subprocess()
Spotted by Vincent Fazio. The old flag value was incorrectly used
instead of the new one when testing to see which flags were set. Likely
a typo.

This will never have worked, because the first few lines of the function
assert that the old flag value is not set.

Includes a unit test so we don’t regress on this in future.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Reported-by: Vincent Fazio <vfazio@gmail.com>

Fixes: #3768
2025-08-26 15:56:56 +01:00
Tobias Stoeckmann
cf97e674ab ghash: Fix entry_is_big for CHERI architecture
The entry_is_big function checks if an entry fits into a so-called
small entry, i.e. into a guint. This optimizes space for hash tables
on 64 bit system with hash tables containing 32 bit entries.

This code actually checks if the highest 32 bits are set, which would
become an issue with CHERI and its 128 bit pointers.

Helps: #2842
2025-08-26 13:06:39 +02:00
Piotr Drąg
073135b8c9 Update Polish translation 2025-08-25 18:23:15 +02:00
Michael Catanzaro
2735b2b331 Merge branch 'strv-docs-example' into 'main'
gtestutils: Fix a slightly broken example in a doc comment

See merge request GNOME/glib!4751
2025-08-22 10:36:02 -05:00
Philip Withnall
354344fe59 2.85.4
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2.85.4
2025-08-22 13:29:34 +01:00
Philip Withnall
c8c3c7f5bd Merge branch 'sl-po' into 'main'
Update Slovenian translation

Closes #3766

See merge request GNOME/glib!4752
2025-08-22 12:09:38 +00:00
Martin
9b11cc0900 Update Slovenian translation
Submitted at https://gitlab.gnome.org/GNOME/glib/-/issues/3766,
committed by Philip Withnall.

Fixes: #3766
2025-08-22 12:52:19 +01:00
Philip Withnall
3894bec664 gtestutils: Fix a slightly broken example in a doc comment
`GStrv` can only be used with `g_auto`, not `g_autoptr`.

Guess who just copied and pasted this code example and found it didn’t
compile?

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-08-21 21:17:07 +01:00
Philip Withnall
b026819ca1 Merge branch 'windows-skip-socket-mock' into 'main'
tests/gio: skip Unix socket-mock tests on Windows

See merge request GNOME/glib!4744
2025-08-21 14:31:24 +00:00
Philip Withnall
5e8cc2559d Merge branch 'gmessage_recursion' into 'main'
gmessages: Fix stack overflow with many fields

Closes #3760

See merge request GNOME/glib!4750
2025-08-21 14:29:35 +00:00
Philip Withnall
2aac71dc33 Merge branch 'ghash_3724' into 'main'
ghash: Handle hash tables with millions of entries

Closes #3724

See merge request GNOME/glib!4749
2025-08-21 14:26:46 +00:00
Tobias Stoeckmann
c8730c7e8c gmessages: Avoid magic numbers
Use G_N_ELEMENTS macro to show exactly what these numbers 16 and 32 mean
in context of g_log_structured function.

Suggested by Marco Trevisan
2025-08-21 16:11:53 +02:00