Skip to content

Fix some return values and replace deprecated GTimeVal with g_get_real_time() - #6646

Merged
swick merged 3 commits into
flatpak:mainfrom
razzeee:fix/g-ascii-strtoll-types
May 13, 2026
Merged

swick merged 3 commits into
flatpak:mainfrom
razzeee:fix/g-ascii-strtoll-types

Conversation

@razzeee

@razzeee razzeee commented May 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

razzeee added 3 commits May 4, 2026 17:30
UIDs are unsigned; using signed strtoll and int can mishandle
high UIDs such as those used by systemd dynamic users.
g_ascii_strtoll returns gint64; storing the result in a narrower
type (int, gint) silently truncates large values.
GTimeVal and g_get_current_time() are deprecated since GLib 2.62
and tv_sec is 32-bit on 32-bit platforms, causing Y2038 overflow.
g_get_real_time() returns gint64 and is safe on all platforms.
@razzeee

razzeee commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

Seems like this failed due to launchpad not being reachable

@bbhtt

bbhtt commented May 11, 2026 •

Copy link
Copy Markdown
Collaborator

Latest commit is bogus, the LLM is hallucinating fixes

@swick

swick commented May 11, 2026

Copy link
Copy Markdown
Collaborator

First 3 commits look fine though.

@razzeee
razzeee force-pushed the fix/g-ascii-strtoll-types branch from c98529d to c009bf5 Compare May 12, 2026 09:09
@razzeee

razzeee commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

I mean, it made sense in my head and also aligned to the recent changes in cleanup behavior as far as I understood.

Removed the commit for now, but expect the CI to fail again - or it is just flaky.

@bbhtt

bbhtt commented May 12, 2026

Copy link
Copy Markdown
Collaborator

it is missing the context of the ostree api

@bbhtt bbhtt changed the title Fix some return values and a case of 2038 problem Fix some return values and replace deprecated GTimeVal with g_get_real_time() May 12, 2026
@bbhtt
bbhtt added this pull request to the merge queue May 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2026
@swick

swick commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Seems like this is triggering some test failures, probably worth investigating.

@bbhtt

bbhtt commented May 12, 2026

Copy link
Copy Markdown
Collaborator

The CodeQL action failed due to GitHub issues, not test failures.

@swick

swick commented May 13, 2026

Copy link
Copy Markdown
Collaborator

https://github.com/flatpak/flatpak/actions/runs/25328415204/job/74440616043?pr=6646

(flatpak search:30781): GLib-CRITICAL **: 15:04:07.466: g_once_init_leave: assertion 'g_atomic_pointer_get (value_location) == 0' failed
/home/runner/work/flatpak/flatpak/tests/test-repo.sh: line 109: 30781 Trace/breakpoint trap   (core dumped) ${FLATPAK} search Hello > search-results

At least that run had flatpak search crashing.

@swick
swick added this pull request to the merge queue May 13, 2026
Merged via the queue into flatpak:main with commit 7b17f13 May 13, 2026
27 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants