NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-evbarm/60780: UBSan complains about left-shifting outside of int type range
>Number: 60780
>Category: port-evbarm
>Synopsis: UBSan complains about left-shifting outside of int type range
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-evbarm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 23 20:55:00 +0000 2026
>Originator: Alexander Schreiber
>Release: HEAD/20260919024529Z
>Organization:
Not Much
>Environment:
Currently not available, but uname reports as evbmips 11.99.8
>Description:
HEAD/20260919024529Z configured with all available debug/diag options starts
spitting out complains from UBSan:
[ 1.0000000] UBSan: Undefined Behavior in /usr/build/HEAD_20260919024529Z/usr/src/sys/arch/mips/mips/mips_machdep.c:1117:20, left shift of 55 by 26 places cannot be represented in type 'int'
[ 1.0000000] UBSan: Undefined Behavior in /usr/build/HEAD_20260919024529Z/usr/src/sys/arch/mips/mips/mips_fixup.c:481:2, left shift of negative value -8
[ 1.0000000] UBSan: Undefined Behavior in /usr/build/HEAD_20260919024529Z/usr/src/sys/arch/mips/mips/mips_fixup.c:491:46, left shift of negative value -8
>How-To-Repeat:
HEAD/20260919024529Z configured with all available debug/diag options:
----------------------- cut here -----------------------
--- OCTEON 2026-07-07 08:14:15.000000000 +0000
+++ ERLITE3 2026-09-21 20:42:03.269928587 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: OCTEON,v 1.19 2026/07/07 08:14:15 kbowling Exp $
+# $NetBSD: OCTEON,v 1.14 2024/01/29 18:27:11 christos Exp $
include "arch/mips/conf/std.octeon"
include "arch/evbmips/conf/files.octeon"
@@ -12,6 +12,31 @@
options FDT
options FDT_DEFAULT_STDOUT_PATH="\"uart0:115200n8\""
+
+
+# MP
+options MULTIPROCESSOR
+
+# Kernel Undefined Behavior Sanitizer (kUBSan).
+options KUBSAN # mandatory
+#options UBSAN_ALWAYS_FATAL # optional: panic on all kUBSan reports
+
+# Kernel Code Coverage Driver.
+makeoptions KCOV=1
+options KCOV
+
+# Heartbeat checks
+options HEARTBEAT
+options HEARTBEAT_MAX_PERIOD_DEFAULT=15
+
+
+
+
+
+
+# config
+options INCLUDE_CONFIG_FILE
+
# Options for necessary to use MD
#options MEMORY_DISK_HOOKS
#options MEMORY_DISK_IS_ROOT # force root on memory disk
@@ -34,10 +59,10 @@
# Debugging options
options DIAGNOSTIC # extra kernel sanity checking
-#options DEBUG # extra kernel debugging support
+options DEBUG # extra kernel debugging support
+options LOCKDEBUG # expensive locking checks/support
#options USERCONF # userconf(4) support
-#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
-#options PMAP_DEBUG
+options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
options DDB # kernel dynamic debugger
options DDB_HISTORY_SIZE=100 # enable history editing in DDB
makeoptions DEBUG="-g" # compile full symbol table
----------------------- cut here -----------------------
Build and run on Ubiquiti Edgerouter Lite (Erlite3).
>Fix:
Home |
Main Index |
Thread Index |
Old Index