Messages in this thread | | | From | Paul Menzel <> | Subject | UBSAN: Undefined behaviour in arch/x86/events/core.c:668:25 | Date | Fri, 20 Jul 2018 09:33:09 +0200 |
| |
Dear Linux folks,
Enabling the undefined behavior sanitizer and building GNU/Linux 4.18-rc5+ (with some unrelated commits) with GCC 8.1.0 from Debian Sid/unstable, the warning below is shown.
> [ 1.945853] ================================================================================ > [ 1.946192] UBSAN: Undefined behaviour in arch/x86/events/core.c:668:25 > [ 1.946309] member access within null pointer of type 'struct perf_event' > [ 1.946500] CPU: 0 PID: 127 Comm: perf_4.17 Not tainted 4.18.0-rc5-00316-g4864b68cedf2 #104 > [ 1.946502] Hardware name: ASROCK E350M1/E350M1, BIOS TIMELESS 01/01/1970 > [ 1.946505] Call Trace: > [ 1.946518] dump_stack+0x55/0x89 > [ 1.946524] ubsan_epilogue+0xb/0x33 > [ 1.946529] handle_null_ptr_deref+0x7f/0x90 > [ 1.946534] __ubsan_handle_type_mismatch_v1+0x55/0x60 > [ 1.946540] x86_pmu_enable_all+0x165/0x1b0 > [ 1.946544] x86_pmu_enable+0x162/0x480 > [ 1.946550] perf_pmu_enable.part.39+0x14/0x30 > [ 1.946553] ctx_resched+0xa4/0x130 > [ 1.946558] __perf_install_in_context+0x21e/0x3e0 > [ 1.946562] ? memcg_kmem_get_cache+0xb2/0x3a0 > [ 1.946565] ? memcg_kmem_get_cache+0xb2/0x3a0 > [ 1.946569] remote_function+0x45/0x60 > [ 1.946574] generic_exec_single+0x102/0x210 > [ 1.946579] ? get_empty_filp+0x6b/0x260 > [ 1.946582] ? task_function_call+0x80/0x80 > [ 1.946586] smp_call_function_single+0xf0/0x150 > [ 1.946590] ? get_empty_filp+0x102/0x260 > [ 1.946594] ? alloc_file+0x9b/0x1e0 > [ 1.946598] perf_install_in_context+0x14e/0x1d0 > [ 1.946602] ? perf_install_in_context+0x1d0/0x1d0 > [ 1.946607] __do_sys_perf_event_open+0x413/0xfa0 > [ 1.946616] sys_perf_event_open+0x21/0x30 > [ 1.946619] do_fast_syscall_32+0xce/0x3e0 > [ 1.946624] entry_SYSENTER_32+0x4e/0x7c > [ 1.946628] EIP: 0xb7f73bb5 > [ 1.946630] Code: 89 e5 8b 55 08 85 d2 8b 80 5c cd ff ff 74 02 89 02 5d c3 8b 04 24 c3 8b 1c 24 c3 8b 3c 24 c3 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76 > [ 1.946699] EAX: ffffffda EBX: 00e3f49c ECX: ffffffff EDX: 00000000 > [ 1.946701] ESI: ffffffff EDI: 00000008 EBP: 00000000 ESP: bfe3257c > [ 1.946704] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000296 > [ 1.946708] ================================================================================
Kind regards,
Paul
| |