]> Gentwo Git Trees - linux/.git/commit
perf sched: Avoid union type punning undefined behavior
authorIan Rogers <irogers@google.com>
Sun, 14 Sep 2025 18:33:53 +0000 (11:33 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 1 Oct 2025 14:22:04 +0000 (11:22 -0300)
commit58a606149c60d5da554302a7a08234cf3ca259f4
tree645d3e0eab4d2b56168d7b5d0df421a404bacc71
parent241f21be7d0fdf3c1792ed7e61f90a9f5eecd03e
perf sched: Avoid union type punning undefined behavior

A union is used to set the priv value in thread (a void*) to a boolean
value through type punning. Undefined behavior sanitizer fails on this.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c