CLNG-BPF [test_maps] test_cls_redirect.o CLNG-BPF [test_maps] atomics.o CLNG-BPF [test_maps] test_cls_redirect_subprogs.o CLNG-BPF [test_maps] metadata_used.o CLNG-BPF [test_maps] socket_cookie_prog.o CLNG-BPF [test_maps] tailcall_bpf2bpf3.o CLNG-BPF [test_maps] test_core_reloc_misc.o CLNG-BPF [test_maps] btf_dump_test_case_multidim.o CLNG-BPF [test_maps] kfunc_call_test.o CLNG-BPF [test_maps] timer_mim_reject.o CLNG-BPF [test_maps] test_tc_edt.o CLNG-BPF [test_maps] xdp_dummy.o CLNG-BPF [test_maps] bpf_cubic.o CLNG-BPF [test_maps] btf__core_reloc_type_based___fn_wrong_args.o CLNG-BPF [test_maps] bind_perm.o CLNG-BPF [test_maps] test_sockmap_skb_verdict_attach.o CLNG-BPF [test_maps] btf_data.o CLNG-BPF [test_maps] test_bpf_cookie.o CLNG-BPF [test_maps] test_sk_storage_tracing.o CLNG-BPF [test_maps] test_verif_scale1.o CLNG-BPF [test_maps] test_rdonly_maps.o CLNG-BPF [test_maps] skb_pkt_end.o CLNG-BPF [test_maps] test_stacktrace_build_id.o CLNG-BPF [test_maps] test_xdp_context_test_run.o CLNG-BPF [test_maps] bpf_iter_ipv6_route.o CLNG-BPF [test_maps] btf__core_reloc_nesting___struct_union_mixup.o CLNG-BPF [test_maps] btf__core_reloc_enumval___diff.o CLNG-BPF [test_maps] test_varlen.o CLNG-BPF [test_maps] sendmsg4_prog.o CLNG-BPF [test_maps] test_core_reloc_flavors.o CLNG-BPF [test_maps] connect_force_port6.o CLNG-BPF [test_maps] tailcall2.o CLNG-BPF [test_maps] test_core_reloc_type_id.o CLNG-BPF [test_maps] test_pe_preserve_elems.o CLNG-BPF [test_maps] test_sysctl_prog.o CLNG-BPF [test_maps] test_global_func12.o CLNG-BPF [test_maps] test_pkt_md_access.o CLNG-BPF [test_maps] atomic_bounds.o CLNG-BPF [test_maps] test_probe_user.o CLNG-BPF [test_maps] bpf_iter_sockmap.o CLNG-BPF [test_maps] test_global_func15.o CLNG-BPF [test_maps] test_global_func16.o CLNG-BPF [test_maps] freplace_global_func.o CLNG-BPF [test_maps] test_link_pinning.o CLNG-BPF [test_maps] btf__core_reloc_arrays___err_wrong_val_type.o CLNG-BPF [test_maps] connect4_dropper.o CLNG-BPF [test_maps] cg_storage_multi_isolated.o CLNG-BPF [test_maps] btf__core_reloc_bitfields___just_big_enough.o CLNG-BPF [test_maps] cg_storage_multi_shared.o CLNG-BPF [test_maps] test_skb_ctx.o CLNG-BPF [test_maps] test_map_init.o CLNG-BPF [test_maps] test_vmlinux.o CLNG-BPF [test_maps] metadata_unused.o CLNG-BPF [test_maps] btf__core_reloc_nesting___err_array_container.o CLNG-BPF [test_maps] test_xdp_devmap_helpers.o CLNG-BPF [test_maps] bpf_iter_udp6.o CLNG-BPF [test_maps] test_sk_lookup_kern.o CLNG-BPF [test_maps] test_tc_tunnel.o CLNG-BPF [test_maps] test_tc_neigh.o CLNG-BPF [test_maps] test_xdp_meta.o CLNG-BPF [test_maps] pyperf_subprogs.o CLNG-BPF [test_maps] test_global_func_args.o CLNG-BPF [test_maps] btf__core_reloc_size___diff_sz.o CLNG-BPF [test_maps] btf__core_reloc_bitfields___bitfield_vs_int.o CLNG-BPF [test_maps] bpf_iter_bpf_array_map.o CLNG-BPF [test_maps] sample_map_ret0.o CLNG-BPF [test_maps] freplace_get_constant.o CLNG-BPF [test_maps] btf__core_reloc_nesting___extra_nesting.o CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_ptr.o CLNG-BPF [test_maps] test_global_data.o CLNG-BPF [test_maps] test_snprintf.o CLNG-BPF [test_maps] test_ksyms_btf_null_check.o CLNG-BPF [test_maps] linked_funcs2.o CLNG-BPF [test_maps] bpf_iter_test_kern5.o CLNG-BPF [test_maps] xdp_redirect_multi_kern.o CLNG-BPF [test_maps] btf__core_reloc_ints___reverse_sign.o CLNG-BPF [test_maps] test_global_func13.o CLNG-BPF [test_maps] test_sockmap_invalid_update.o CLNG-BPF [test_maps] test_xdp_loop.o CLNG-BPF [test_maps] btf__core_reloc_nesting___err_array_field.o In file included from progs/test_cls_redirect_subprogs.c:2: progs/test_cls_redirect.c:90:2: error: static_assert expression is not an integral constant expression sizeof(flow_ports_t) != ^~~~~~~~~~~~~~~~~~~~~~~ progs/test_cls_redirect.c:91:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression offsetofend(struct bpf_sock_tuple, ipv4.dport) - ^ progs/test_cls_redirect.c:32:3: note: expanded from macro 'offsetofend' progs/test_cls_redirect.c (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))): ^ 90:2/home/ec2-user/linux-stable/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:: 81:error33: : static_assert expression is not an integral constant expressionnote : expanded from macro 'offsetof' #define offsetof(type, member) ((unsigned long)&((type *)0)->member) ^ sizeof(flow_ports_t) != ^~~~~~~~~~~~~~~~~~~~~~~ progs/test_cls_redirect.c:91:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression offsetofend(struct bpf_sock_tuple, ipv4.dport) - ^ progs/test_cls_redirect.c:32:3: note: expanded from macro 'offsetofend' (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) ^ /home/ec2-user/linux-stable/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:81:33: note: expanded from macro 'offsetof' In file included from progs/test_cls_redirect_subprogs.c:2: progs/test_cls_redirect.c:95:2: error: #define offsetof(type, member) ((unsigned long)&((type *)0)->member)static_assert expression is not an integral constant expression ^ sizeof(flow_ports_t) != ^~~~~~~~~~~~~~~~~~~~~~~ progs/test_cls_redirect.c:96:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression offsetofend(struct bpf_sock_tuple, ipv6.dport) - ^ progs/test_cls_redirect.c:32:3: note: expanded from macro 'offsetofend' (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) ^ /home/ec2-user/linux-stable/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:81:33: note: expanded from macro 'offsetof' #define offsetof(type, member) ((unsigned long)&((type *)0)->member) ^ progs/test_cls_redirect.c:95:2: error: static_assert expression is not an integral constant expression sizeof(flow_ports_t) != ^~~~~~~~~~~~~~~~~~~~~~~ progs/test_cls_redirect.c:96:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression offsetofend(struct bpf_sock_tuple, ipv6.dport) - ^ progs/test_cls_redirect.c:32:3: note: expanded from macro 'offsetofend' (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) ^ /home/ec2-user/linux-stable/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:81:33: note: expanded from macro 'offsetof' #define offsetof(type, member) ((unsigned long)&((type *)0)->member) ^ CLNG-BPF [test_maps] dev_cgroup.o CLNG-BPF [test_maps] btf__core_reloc_arrays___err_non_array.o CLNG-BPF [test_maps] perf_event_stackmap.o CLNG-BPF [test_maps] bpf_iter_task_file.o CLNG-BPF [test_maps] xdp_tx.o CLNG-BPF [test_maps] profiler3.o CLNG-BPF [test_maps] freplace_attach_probe.o CLNG-BPF [test_maps] test_ksyms_btf_write_check.o CLNG-BPF [test_maps] bpf_iter_bpf_map.o CLNG-BPF [test_maps] bpf_dctcp.o fatal error: error in backend: line 27: Invalid usage of the XADD return value PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ec2-user/linux-stable/tools/testing/selftests/bpf/tools/include -I/home/ec2-user/linux-stable/tools/testing/selftests/bpf -I/home/ec2-user/linux-stable/tools/include/uapi -I/home/ec2-user/linux-stable/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib64/clang/11.1.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomics.c -o /home/ec2-user/linux-stable/tools/testing/selftests/bpf/atomics.o -mcpu=v3 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'progs/atomics.c'. 4. Running pass 'BPF PreEmit Checking' on function '@add' CLNG-BPF [test_maps] freplace_cls_redirect.o CLNG-BPF [test_maps] test_perf_buffer.o CLNG-BPF [test_maps] test_ksyms_module.o 2 errors generated. CLNG-BPF [test_maps] btf__core_reloc_arrays___fixed_arr.o CLNG-BPF [test_maps] test_d_path.o CLNG-BPF [test_maps] test_xdp_adjust_tail_grow.o 2 errors generated. CLNG-BPF [test_maps] tailcall5.o CLNG-BPF [test_maps] test_mmap.o CLNG-BPF [test_maps] test_lwt_ip_encap.o make: *** [/home/ec2-user/linux-stable/tools/testing/selftests/bpf/test_cls_redirect_subprogs.o] Error 1 make: *** Waiting for unfinished jobs.... CLNG-BPF [test_maps] btf__core_reloc_mods___mod_swap.o make: *** [/home/ec2-user/linux-stable/tools/testing/selftests/bpf/test_cls_redirect.o] Error 1 fatal error: error in backend: line 18: Invalid usage of the XADD return value PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ec2-user/linux-stable/tools/testing/selftests/bpf/tools/include -I/home/ec2-user/linux-stable/tools/testing/selftests/bpf -I/home/ec2-user/linux-stable/tools/include/uapi -I/home/ec2-user/linux-stable/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib64/clang/11.1.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomic_bounds.c -o /home/ec2-user/linux-stable/tools/testing/selftests/bpf/atomic_bounds.o -mcpu=v3 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'progs/atomic_bounds.c'. 4. Running pass 'BPF PreEmit Checking' on function '@sub' #0 0x00007f842aa75b3a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib64/libLLVM-11.so+0xb3cb3a) #1 0x00007f842aa739db llvm::sys::RunSignalHandlers() (/lib64/libLLVM-11.so+0xb3a9db) #2 0x00007f842aa742ad llvm::sys::CleanupOnSignal(unsigned long) (/lib64/libLLVM-11.so+0xb3b2ad) #3 0x00007f842a9ab1e2 llvm::CrashRecoveryContext::HandleExit(int) (/lib64/libLLVM-11.so+0xa721e2) #4 0x00007f842aa6e1e7 llvm::sys::Process::Exit(int) (/lib64/libLLVM-11.so+0xb351e7) #5 0x0000000000413a22 (/usr/bin/clang-11+0x413a22) #6 0x00007f842a9baf39 llvm::report_fatal_error(llvm::Twine const&, bool) (/lib64/libLLVM-11.so+0xa81f39) #7 0x00007f842a9bb0ae (/lib64/libLLVM-11.so+0xa820ae) #8 0x00007f842c9628ae (/lib64/libLLVM-11.so+0x2a298ae) #9 0x00007f842adac0f0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/lib64/libLLVM-11.so+0xe730f0) #10 0x00007f842ab8ed84 llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib64/libLLVM-11.so+0xc55d84) #11 0x00007f842ab8f441 llvm::FPPassManager::runOnModule(llvm::Module&) (/lib64/libLLVM-11.so+0xc56441) #12 0x00007f842ab8e182 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib64/libLLVM-11.so+0xc55182) #13 0x00007f8427fda792 (/lib64/libclang-cpp.so.11.1+0x1730792) #14 0x00007f8427fdc599 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr >) (/lib64/libclang-cpp.so.11.1+0x1732599) #15 0x00007f84282c8068 (/lib64/libclang-cpp.so.11.1+0x1a1e068) #16 0x00007f84272afe8a clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.11.1+0xa05e8a) #17 0x00007f84282c8281 clang::CodeGenAction::ExecuteAction() (/lib64/libclang-cpp.so.11.1+0x1a1e281) #18 0x00007f8428a3e66a clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.11.1+0x219466a) #19 0x00007f84289f7db7 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.11.1+0x214ddb7) #20 0x00007f8428ab9da3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.11.1+0x220fda3) #21 0x00000000004150b5 cc1_main(llvm::ArrayRef, char const*, void*) (/usr/bin/clang-11+0x4150b5) #22 0x00000000004132ff (/usr/bin/clang-11+0x4132ff) #23 0x00007f8428712b15 (/lib64/libclang-cpp.so.11.1+0x1e68b15) #24 0x00007f842a9ab083 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/lib64/libLLVM-11.so+0xa72083) #25 0x00007f842871682c clang::driver::CC1Command::Execute(llvm::ArrayRef >, std::__cxx11::basic_string, std::allocator >*, bool*) const (/lib64/libclang-cpp.so.11.1+0x1e6c82c) #26 0x00007f84286ec23a clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/lib64/libclang-cpp.so.11.1+0x1e4223a) #27 0x00007f84286ecacd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl >&) const (/lib64/libclang-cpp.so.11.1+0x1e42acd) #28 0x00007f84286f660f clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl >&) (/lib64/libclang-cpp.so.11.1+0x1e4c60f) #29 0x000000000040ff69 main (/usr/bin/clang-11+0x40ff69) #30 0x00007f8425c4613a __libc_start_main (/lib64/libc.so.6+0x2113a) #31 0x0000000000411c6a _start (/usr/bin/clang-11+0x411c6a) make: *** [/home/ec2-user/linux-stable/tools/testing/selftests/bpf/atomics.o] Error 1 #0 0x00007fb4dbc91b3a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib64/libLLVM-11.so+0xb3cb3a) #1 0x00007fb4dbc8f9db llvm::sys::RunSignalHandlers() (/lib64/libLLVM-11.so+0xb3a9db) #2 0x00007fb4dbc902ad llvm::sys::CleanupOnSignal(unsigned long) (/lib64/libLLVM-11.so+0xb3b2ad) #3 0x00007fb4dbbc71e2 llvm::CrashRecoveryContext::HandleExit(int) (/lib64/libLLVM-11.so+0xa721e2) #4 0x00007fb4dbc8a1e7 llvm::sys::Process::Exit(int) (/lib64/libLLVM-11.so+0xb351e7) #5 0x0000000000413a22 (/usr/bin/clang-11+0x413a22) #6 0x00007fb4dbbd6f39 llvm::report_fatal_error(llvm::Twine const&, bool) (/lib64/libLLVM-11.so+0xa81f39) #7 0x00007fb4dbbd70ae (/lib64/libLLVM-11.so+0xa820ae) #8 0x00007fb4ddb7e8ae (/lib64/libLLVM-11.so+0x2a298ae) #9 0x00007fb4dbfc80f0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/lib64/libLLVM-11.so+0xe730f0) #10 0x00007fb4dbdaad84 llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib64/libLLVM-11.so+0xc55d84) #11 0x00007fb4dbdab441 llvm::FPPassManager::runOnModule(llvm::Module&) (/lib64/libLLVM-11.so+0xc56441) #12 0x00007fb4dbdaa182 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib64/libLLVM-11.so+0xc55182) #13 0x00007fb4d91f6792 (/lib64/libclang-cpp.so.11.1+0x1730792) #14 0x00007fb4d91f8599 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr >) (/lib64/libclang-cpp.so.11.1+0x1732599) #15 0x00007fb4d94e4068 (/lib64/libclang-cpp.so.11.1+0x1a1e068) #16 0x00007fb4d84cbe8a clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.11.1+0xa05e8a) #17 0x00007fb4d94e4281 clang::CodeGenAction::ExecuteAction() (/lib64/libclang-cpp.so.11.1+0x1a1e281) #18 0x00007fb4d9c5a66a clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.11.1+0x219466a) #19 0x00007fb4d9c13db7 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.11.1+0x214ddb7) #20 0x00007fb4d9cd5da3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.11.1+0x220fda3) #21 0x00000000004150b5 cc1_main(llvm::ArrayRef, char const*, void*) (/usr/bin/clang-11+0x4150b5) #22 0x00000000004132ff (/usr/bin/clang-11+0x4132ff) #23 0x00007fb4d992eb15 (/lib64/libclang-cpp.so.11.1+0x1e68b15) #24 0x00007fb4dbbc7083 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/lib64/libLLVM-11.so+0xa72083) #25 0x00007fb4d993282c clang::driver::CC1Command::Execute(llvm::ArrayRef >, std::__cxx11::basic_string, std::allocator >*, bool*) const (/lib64/libclang-cpp.so.11.1+0x1e6c82c) #26 0x00007fb4d990823a clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/lib64/libclang-cpp.so.11.1+0x1e4223a) #27 0x00007fb4d9908acd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl >&) const (/lib64/libclang-cpp.so.11.1+0x1e42acd) #28 0x00007fb4d991260f clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl >&) (/lib64/libclang-cpp.so.11.1+0x1e4c60f) #29 0x000000000040ff69 main (/usr/bin/clang-11+0x40ff69) #30 0x00007fb4d6e6213a __libc_start_main (/lib64/libc.so.6+0x2113a) #31 0x0000000000411c6a _start (/usr/bin/clang-11+0x411c6a) make: *** [/home/ec2-user/linux-stable/tools/testing/selftests/bpf/atomic_bounds.o] Error 1