Commit Graph

30727 Commits

Author SHA1 Message Date
Philip Withnall
bd40fbba13
2.82.1
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-19 21:56:26 +01:00
Philip Withnall
211be419cf Merge branch 'backport-4281-socks4a-buffer-overflow-glib-2-82' into 'glib-2-82'
Backport !4281 “gsocks4aproxy: Fix a single byte buffer overflow in connect messages” to glib-2-82

See merge request GNOME/glib!4282
2024-09-19 20:51:27 +00:00
Philip Withnall
f53843043e
ci: Force submodules to be fetched first in VS2017 CI jobs
No idea why this is now suddenly not working.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-19 21:40:11 +01:00
Michael Catanzaro
ec0b708b98 gsocks4aproxy: Fix a single byte buffer overflow in connect messages
`SOCKS4_CONN_MSG_LEN` failed to account for the length of the final nul
byte in the connect message, which is an addition in SOCKSv4a vs
SOCKSv4.

This means that the buffer for building and transmitting the connect
message could be overflowed if the username and hostname are both
`SOCKS4_MAX_LEN` (255) bytes long.

Proxy configurations are normally statically configured, so the username
is very unlikely to be near its maximum length, and hence this overflow
is unlikely to be triggered in practice.

(Commit message by Philip Withnall, diagnosis and fix by Michael
Catanzaro.)

Fixes: #3461
2024-09-19 21:07:53 +01:00
Michael Catanzaro
23a7a5d41d Merge branch 'wip/pwithnall/backport-3965-macos-ci-apple-silicon-glib-2-82' into 'glib-2-82'
Backport !3965 “Move to Apple Silicon based runner” to glib-2-82

See merge request GNOME/glib!4276
2024-09-17 13:51:54 +00:00
Philip Withnall
9af1726cd7
ci: Re-add contextual links for a FIXME message
To avoid people having to do git archaeology in future to work out why
`--wrap-mode=nodownload` is such a good idea.
2024-09-17 13:16:56 +01:00
René de Hesselle
c4cc1c3a5d Move to Apple Silicon based runner
Remove cmake as we no longer need to build ninja. We can use the
official wheel now since the runner's Python is 3.9 (before: 3.8).

Use the same comment regarding '--wrap-mode' as in the other jobs.

Download and use official ccache binary.

Add myself to the 'only' section in .gitlab-ci.yml so I can have
CI in my fork.

Disable a few deprecation warnings due to the much newer SDK of
the Apple Silicon machine.
2024-09-17 13:16:01 +01:00
Philip Withnall
d793986f02 Merge branch 'backport-4267-georgian-translation-glib-2-82' into 'glib-2-82'
Update Georgian translation (glib-2-82)

See merge request GNOME/glib!4274
2024-09-13 10:28:02 +00:00
NorwayFun
a7e87e10ed Update ka.po 2024-09-13 11:11:28 +01:00
Michael Catanzaro
d6b30aa9f1 Merge branch 'backport-4269-docs-fix-glib-2-82' into 'glib-2-82'
Backport !4269 “docs(glib): Fix link in string-utils ref” to glib-2-82

See merge request GNOME/glib!4271
2024-09-12 15:17:27 +00:00
Philip Withnall
3a5288b3e3 Merge branch 'glib-2-82' into 'glib-2-82'
Update Russian translation for 2-82

See merge request GNOME/glib!4270
2024-09-12 14:09:19 +00:00
FeRD (Frank Dana)
fee5da6893 docs(glib): Fix link in string-utils ref 2024-09-12 14:47:38 +01:00
jtux270
29f0c071ba Update Russian translation for 2-82 2024-09-12 13:09:00 +00:00
Philip Withnall
aec0a38158 Merge branch 'update-lt-glib-2-82' into 'glib-2-82'
Updated Lithuanian translation

See merge request GNOME/glib!4263
2024-09-11 17:15:01 +00:00
Philip Withnall
7b1eb02291 Merge branch 'update-danish-translation-2-82' into 'glib-2-82'
Update Danish translation (2-82)

See merge request GNOME/glib!4265
2024-09-11 10:49:18 +00:00
Ask Hjorth Larsen
8066748684 Update Danish translation 2024-09-10 22:58:34 +02:00
Aurimas Černius
2f4a3612c0 Updated Lithuanian translation 2024-09-10 22:00:42 +03:00
Philip Withnall
3f5e135ba1 Merge branch 'urbalazs-glib-2-82-patch-28588' into 'glib-2-82'
Update Hungarian translation

See merge request GNOME/glib!4258
2024-09-09 10:27:43 +00:00
Philip Withnall
9fcbb00124 Merge branch 'glib-2-82' into 'glib-2-82'
Update British English translation

See merge request GNOME/glib!4255
2024-09-09 10:22:48 +00:00
Philip Withnall
96952a9719 Merge branch 'glib-2-82' into 'glib-2-82'
Update Bulgarian translation

See merge request GNOME/glib!4251
2024-09-09 10:16:36 +00:00
Philip Withnall
7f726b83fa Merge branch 'glib-2-82' into 'glib-2-82'
Update Indonesian translation

See merge request GNOME/glib!4259
2024-09-09 10:10:05 +00:00
Andika Triwidada
2d1a297943 Updated Indonesian translation 2024-09-09 09:10:16 +00:00
Balázs Úr
946c2c3024 Update Hungarian translation 2024-09-09 06:53:06 +00:00
Bruce Cowan
123360d10c Update British English translation 2024-09-08 19:12:15 +00:00
twlvnn kraftwerk
ed7d2b9b43 Update Bulgarian translation
Proof-read via D-L.
2024-09-07 16:44:04 +02:00
Philip Withnall
e2bc67de88 Merge branch 'glib-2-82' into 'glib-2-82'
Update German translation

See merge request GNOME/glib!4241
2024-09-05 10:25:10 +00:00
Tim Sabsch
da8eeaa10f Update German translation
Proof-read at https://l10n.gnome.org/vertimus/6432/390/18/
2024-09-05 07:30:10 +02:00
Philip Withnall
8b6983846b Merge branch 'glib-2-82' into 'glib-2-82'
Update Galician translations for glib-2-82

See merge request GNOME/glib!4240
2024-09-04 12:02:17 +00:00
Fran Diéguez
dc009da37b Update gl.po 2024-09-04 10:10:49 +00:00
Philip Withnall
34d02655be Merge branch 'backport-4237-fr-translation-glib-2-82' into 'glib-2-82'
Backport !4237 “Update french translation” to glib-2-82

See merge request GNOME/glib!4238
2024-09-03 15:38:04 +00:00
Vincent Chatelain
4a6e5d96b1 Update french translation 2024-09-03 16:09:38 +01:00
Philip Withnall
920134534e Merge branch 'rafaelff-glib-2-82-patch-88113' into 'glib-2-82'
Update Brazilian Portuguese translation

See merge request GNOME/glib!4234
2024-09-03 08:51:48 +00:00
Rafael Fontenelle
3a184c0059 Update Brazilian Portuguese translation 2024-09-02 16:02:14 +00:00
Philip Withnall
e12ffff43c Merge branch 'glib-2-82' into 'glib-2-82'
Update fa.po

See merge request GNOME/glib!4233
2024-09-02 15:10:33 +00:00
Danial Behzadi
93679f9d4a Update fa.po 2024-09-02 14:30:50 +00:00
Philip Withnall
0771249575 Merge branch 'patch-2-pt' into 'glib-2-82'
Update Portuguese translation

See merge request GNOME/glib!4231
2024-09-02 09:34:21 +00:00
Hugo Carvalho
73ac8840f8 Replace pt.po
Update Portuguese translation
2024-09-01 21:54:43 +00:00
Philip Withnall
5eeae58de7 Merge branch 'cs-update-2-82' into 'glib-2-82'
Update Czech translation [glib-2-82]

See merge request GNOME/glib!4230
2024-09-01 21:47:29 +00:00
AsciiWolf
6e1d35c643 Update Czech translation 2024-09-01 21:36:24 +02:00
Philip Withnall
1f502b00eb Merge branch 'piotrdrag/pl-translation-240831' into 'glib-2-82'
Update Polish translation for glib-2-82

See merge request GNOME/glib!4229
2024-09-01 17:23:01 +00:00
Piotr Drąg
b9f45f109b Update Polish translation 2024-08-31 15:09:15 +02:00
Michael Catanzaro
43c71b27e4 Merge branch 'backport-4219-bash-glib-2-82' into 'glib-2-82'
Backport !4219 “tests: Run lint tests with detected bash” to glib-2-82

See merge request GNOME/glib!4221
2024-08-28 13:24:09 +00:00
Michael Catanzaro
fbc65c1d12 Merge branch 'backport-4217-mtab-fixes-glib-2-82' into 'glib-2-82'
Backport !4217 “tests: Test against a sample mtab file in unix-mounts for getmntent()” to glib-2-82

See merge request GNOME/glib!4220
2024-08-28 13:18:42 +00:00
Benjamin Gilbert
8ed025769e tests: Run lint tests with detected bash
When we invoke a shell script directly, the system selects a bash binary
that might be different from the one detected by find_program('bash').
Explicitly use the one detected by Meson, matching the behavior of our
other test() invocations on shell scripts.

Fixes test failure on Windows in GitHub Actions CI:

    stdout: 1: UNKNOWN: Windows Subsystem for Linux has no installed distributions.
    stdout: 2: UNKNOWN: Distributions can be installed by visiting the Microsoft Store:
    stdout: 3: UNKNOWN: https://aka.ms/wslstore

Found-by: Benoit Pierre <benoit.pierre@gmail.com>
Fixes: d7601f7eed ("Incorporate some lint checks into `meson test`")
2024-08-28 11:02:53 +01:00
Philip Withnall
729b932d0b
tests: Test against a sample mtab file in unix-mounts for getmntent()
The test in `unix-mounts` to see whether `g_unix_mounts_get_from_file()`
can parse an example file was working fine when GLib is built with
libmount, but not when built without it (and hence typically using
`getmntent()`).

This is because libmount supports mountinfo files (like
`/proc/self/mountinfo`), but `getmntent()` only supports mount files
(like `/proc/mounts`). The test was written only with the former.

So, change the test to use mount files when GLib is built without
libmount support.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3456
2024-08-28 10:59:38 +01:00
Philip Withnall
8200545ece
2.82.0
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-26 10:17:20 +01:00
Philip Withnall
d7795da6ab Merge branch 'backports-to-glib-2-82' into 'glib-2-82'
Various small backports to glib-2-82

See merge request GNOME/glib!4213
2024-08-26 09:03:42 +00:00
Philip Withnall
27e5e4d4a2 Merge branch 'backport-4214-mutex-speedup-glib-2-82' into 'glib-2-82'
Backport !4214 “gthread: Move thread _impl functions to static inlines for speed” to glib-2-82

See merge request GNOME/glib!4215
2024-08-26 08:27:42 +00:00
Philip Withnall
e2875a9fca
gthread: Move thread _impl functions to static inlines for speed
The changes made in commit bc59e28bf6
(issue #3399) fixed introspection of the GThread API. However, they
introduced a trampoline in every threading function. So with those
changes applied, the disassembly of `g_mutex_lock()` (for example) was:
```
0x7ffff7f038b0 <g_mutex_lock>    jmp 0x7ffff7f2f440 <g_mutex_lock_impl>
0x7ffff7f038b5                   data16 cs nopw 0x0(%rax,%rax,1)
```

i.e. It jumps straight to the `_impl` function, even with an optimised
build. Since `g_mutex_lock()` (and various other GThread functions) are
frequently run hot paths, this additional `jmp` to a function which has
ended up in a different code page is a slowdown which we’d rather avoid.

So, this commit reworks things to define all the `_impl` functions as
`G_ALWAYS_INLINE static inline` (which typically expands to
`__attribute__((__always_inline__)) static inline`), and to move them
into the same compilation unit as `gthread.c` so that they can be
inlined without the need for link-time optimisation to be enabled.

It makes the code a little less readable, but not much worse than what
commit bc59e28bf6 already did. And perhaps
the addition of the `inline` decorations to all the `_impl` functions
will make it a bit clearer what their intended purpose is
(platform-specific implementations).

After applying this commit, the disassembly of `g_mutex_lock()`
successfully contains the inlining for me:
```
=> 0x00007ffff7f03d80 <+0>:	xor    %eax,%eax
   0x00007ffff7f03d82 <+2>:	mov    $0x1,%edx
   0x00007ffff7f03d87 <+7>:	lock cmpxchg %edx,(%rdi)
   0x00007ffff7f03d8b <+11>:	jne    0x7ffff7f03d8e <g_mutex_lock+14>
   0x00007ffff7f03d8d <+13>:	ret
   0x00007ffff7f03d8e <+14>:	jmp    0x7ffff7f03610 <g_mutex_lock_slowpath>
```

I considered making a similar change to the other APIs touched in #3399
(GContentType, GAppInfo, GSpawn), but they are all much less performance
critical, so it’s probably not worth making their code more complex for
that sake.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3417
2024-08-26 08:38:58 +01:00
Philip Withnall
635b033a2b
docs: Set -Dglib_debug=enabled by default and document it for distros
As per https://gitlab.gnome.org/GNOME/glib/-/issues/3421#note_2206315:

It seems like there’s agreement that glib_debug should be enabled for
developers and disabled for distros; and it also seems like there’s no
reliable way to figure this out magically (because not everyone ties
things to `-Dbuildtype=*`). So, we’re left with forcing some group of
people to manually set the value of `glib_debug`. There are more
developers/contributors than there are distros, and distros are more
likely to notice an accidentally-slow GLib package than developers are
likely to notice an accidentally-not-asserting-hard-enough local build,
so let’s say:

The default should be `-Dglib_debug=enabled`, and distros should probably
all override that to `-Dglib_debug=disabled`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3421
2024-08-25 18:45:58 +01:00