Shouldn't this: memtop |= (uint16_t)mpbios_page[0x414] << 8;
be actually << 16 to keep the same semantics? Jaromir Le dim. 8 juil. 2018 à 01:05, Kamil Rytarowski <ka...@netbsd.org> a écrit : > > Module Name: src > Committed By: kamil > Date: Sat Jul 7 23:05:50 UTC 2018 > > Modified Files: > src/sys/arch/x86/x86: mpbios.c > > Log Message: > Remove unaligned access to mpbios_page[] > > Replace unaligned pointer dereference with a more portable construct that > is free from Undefined Behavior semantics. > > sys/arch/x86/x86/mpbios.c:308:11, load of misaligned address > 0xffff800031c7a413 for type 'const __uint16_t' which requires 2 byte alignment > > Detected with Kernel Undefined Behavior Sanitizer > > > To generate a diff of this commit: > cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/mpbios.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. >