lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Nov 2021 18:24:44 +0800
From:   Ma Xinjian <xinjianx.ma@...el.com>
To:     irogers@...gle.com
Cc:     acme@...nel.org, alexander.shishkin@...ux.intel.com,
        daniel@...earbox.net, jolsa@...hat.com, leo.yan@...aro.org,
        linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        llvm@...ts.linux.dev, mark.rutland@....com, mingo@...hat.com,
        mpetlan@...hat.com, namhyung@...nel.org, nathan@...nel.org,
        ndesaulniers@...gle.com, peterz@...radead.org,
        sedat.dilek@...il.com, philip.li@...el.com
Subject: Re: [PATCH 2/2] perf clang: Fixes for more recent LLVM/clang

Hi

We build perf with clang also recently, but unlucky that failed with 
following errors:


```
In file included from /usr/lib/llvm-7/include/llvm/ADT/STLExtras.h:21,
                  from /usr/lib/llvm-7/include/llvm/ADT/StringRef.h:13,
                  from /usr/lib/llvm-7/include/clang/Basic/Version.h:20,
                  from test-clang.cpp:2:
/usr/lib/llvm-7/include/llvm/ADT/SmallVector.h: In instantiation of 
'void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with 
T = clang::driver::OffloadUnbundlingJobAction::DependentActionInfo]':
/usr/lib/llvm-7/include/clang/Driver/Action.h:579:61:   required from here
/usr/lib/llvm-7/include/llvm/ADT/SmallVector.h:313:11: error: 'void* 
memcpy(void*, const void*, size_t)' writing to an object of type 'struct 
clang::driver::OffloadUnbundlingJobAction::DependentActionInfo' with no 
trivial copy-assignment; use copy-initialization instead 
[-Werror=class-memaccess]
      memcpy(this->end(), &Elt, sizeof(T));
      ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-7/include/clang/Driver/Driver.h:15,
                  from test-clang.cpp:6:
/usr/lib/llvm-7/include/clang/Driver/Action.h:549:10: note: 'struct 
clang::driver::OffloadUnbundlingJobAction::DependentActionInfo' declared 
here
    struct DependentActionInfo final {
           ^~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```

llvm version: 7
rootfs: Debian10
kernel: v5.8 v5.11 v5.15
reproduce:
$ cd linux/tools/perf
$ make LIBCLANGLLVM=1 ARCH= EXTRA_CFLAGS='-fno-omit-frame-pointer 
-fsanitize=undefined -fsanitize=address'

Would you please kindly point out what's wrong with our steps? Or can 
you give us your command to make perf with clang?


Thanks
Ma Xinjian

Powered by blists - more mailing lists