On Fri, Jan 24, 2020 at 09:36:54AM -0800, Linus Torvalds wrote: > On Fri, Jan 24, 2020 at 12:25 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > > > > Just for curiosity's sake. What does clang actually do in that case? > > This shouldn't necessarily be clang-specific. If the variable itself > is 'const', it might go into a read-only section. So trying to modify > it will quite possibly hit a SIGSEGV in user space (and in kernel > space cause an oops). Quite; but I worried clang would use the UB to omit the access entirely, and therefore rob us of the well deserved crash or something. Let me go read Nick's email tho, see what it actually does.