Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Buildroot version and select GCC 14 with binutils 2.42 #52

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

shengwen-tw
Copy link
Collaborator

This commit intends to avoid a recent glibc bug that mistakenly uses 64-bit time on 32-bit machines.

Consider the Linux input_event structure:

struct input_event {
	struct timeval time;
	__u16 type;
	__u16 code;
	__s32 value;
};

On RV32 Linux, the total size of this structure should be 16 bytes (8+2+2+4). However, due to a known glibc bug [2] that incorrectly utilizes the 64-bit time type, the actual size of the structure becomes 24 bytes (16+2+2+4).

Without this fix, the bug would affect the usage of DirectFB2 in the semu project. Fortunately, upgrading the toolchain version resolves the issue.

[1] https://lore.kernel.org/lkml/[email protected]/T/
[2] https://sourceware.org/pipermail/libc-help/2024-January/006563.html

This commit intends to avoid a recent glibc bug that mistakenly uses 64-bit
time on 32-bit machines.

Consider the Linux `input_event` structure:

struct input_event {
	struct timeval time;
	__u16 type;
	__u16 code;
	__s32 value;
};

On RV32 Linux, the total size of this structure should be 16 bytes (8+2+2+4).
However, due to a known glibc bug [2] that incorrectly utilizes the 64-bit time
type, the actual size of the structure becomes 24 bytes (16+2+2+4).

Without this fix, the bug would affect the usage of DirectFB2 in the semu
project. Fortunately, upgrading the toolchain version resolves the issue.

[1] https://lore.kernel.org/lkml/[email protected]/T/
[2] https://sourceware.org/pipermail/libc-help/2024-January/006563.html
Copy link
Collaborator

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimize configs/buildroot.config. Leave the necessary entries.

@jserv jserv merged commit 1023b4c into sysprog21:master Aug 27, 2024
2 checks passed
@jserv
Copy link
Collaborator

jserv commented Aug 27, 2024

Thank @shengwen-tw for contributing!

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.

2 participants