Skip to content

scx_central: fix sched_setaffinity() call with the set size.#3020

Closed
devnexen wants to merge 1 commit intosched-ext:mainfrom
devnexen:scx_central_valgrind_fix
Closed

scx_central: fix sched_setaffinity() call with the set size.#3020
devnexen wants to merge 1 commit intosched-ext:mainfrom
devnexen:scx_central_valgrind_fix

Conversation

@devnexen
Copy link
Copy Markdown
Contributor

@devnexen devnexen commented Nov 8, 2025

we allocate space for a dynamic cpu set sized (nr_cpu_ids).

==399573== Syscall param sched_setaffinity(mask) points to unaddressable byte(s)
==399573== at 0x4ACF85B: sched_setaffinity@@GLIBC_2.3.4 (sched_setaffinity.c:33)
==399573== by 0x4004780: main (in /home/dcarlier/Contribs/scx/build/scheds/c/scx_central)
==399573== Address 0x6e96908 is 0 bytes after a block of size 8 alloc'd
==399573== at 0x490E858: malloc (vg_replace_malloc.c:446)
==399573== by 0x400461B: main (in /home/dcarlier/Contribs/scx/build/scheds/c/scx_central)

we allocate space for a dynamic cpu set sized (nr_cpu_ids).

==399573== Syscall param sched_setaffinity(mask) points to unaddressable byte(s)
==399573==    at 0x4ACF85B: sched_setaffinity@@GLIBC_2.3.4 (sched_setaffinity.c:33)
==399573==    by 0x4004780: main (in /home/dcarlier/Contribs/scx/build/scheds/c/scx_central)
==399573==  Address 0x6e96908 is 0 bytes after a block of size 8 alloc'd
==399573==    at 0x490E858: malloc (vg_replace_malloc.c:446)
==399573==    by 0x400461B: main (in /home/dcarlier/Contribs/scx/build/scheds/c/scx_central)

Signed-off-by: David Carlier <devnexen@gmail.com>
@htejun
Copy link
Copy Markdown
Contributor

htejun commented Feb 11, 2026

Sorry about the delay. Can you please respin this against tools/sched_ext/scx_central.c in the linux kernel and post it on the kernel side? We're removing C scheds from this repo. Thanks.

@htejun htejun closed this Feb 11, 2026
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