Package: llvm-7-dev Version: 1:7.0.1-9 Severity: important -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
The following snippet will cause segmentation fault on armel ``` #include <llvm/Support/FileSystem.h> using namespace llvm; int main() { std::error_code ec; for (sys::fs::directory_iterator I("/tmp", ec, false), E; I != E && !ec; I.increment(ec)) {} } ``` (sid_armel-dchroot)zhsj@abel:~/test$ g++ test.cc /usr/lib/llvm-7/lib/libLLVM-7.so.1 && ./a.out Segmentation fault Program received signal SIGSEGV, Segmentation fault. memcpy () at ../sysdeps/arm/memcpy.S:178 178 ../sysdeps/arm/memcpy.S: No such file or directory. (gdb) bt #0 memcpy () at ../sysdeps/arm/memcpy.S:178 #1 0xb4393988 in copy () at /usr/lib/gcc/arm-linux-gnueabi/8/../../../../include/c++/8/bits/char_traits.h:352 #2 _S_copy () at /usr/lib/gcc/arm-linux-gnueabi/8/../../../../include/c++/8/bits/basic_string.h:340 #3 operator= () at /usr/lib/gcc/arm-linux-gnueabi/8/../../../../include/c++/8/bits/basic_string.h:751 #4 operator= () at /build/llvm-toolchain-7-sHVMRE/llvm-toolchain-7-7.0.1/include/llvm/Support/FileSystem.h:1098 #5 directory_iterator_construct () at /build/llvm-toolchain-7-sHVMRE/llvm-toolchain-7-7.0.1/lib/Support/Unix/Path.inc:707 #6 0x00402078 in llvm::sys::fs::directory_iterator::directory_iterator (this=0xbefff5a0, path=..., ec=..., follow_symlinks=false) at /usr/include/llvm/Support/FileSystem.h:1163 #7 0x00401344 in main () at test.cc:7 It works on amd64. llvm-8 also gets segmentation fault. Shengjing Zhu -----BEGIN PGP SIGNATURE----- iQFEBAEBCgAuFiEE85F2DZP0aJKsSKyHONAPABi+PjUFAl1PDN8QHHpoc2pAZGVi aWFuLm9yZwAKCRA40A8AGL4+NR8OB/0QyQjcS9drIIIw5bwY6k6Ezrm2CF0yBRq2 iW7A3/Z8md1R9RzByjygKpCdQmEeEOSz+7ibnDIpYdIu0As9kLKpUKSh5ACNH9wY VIwTHjRNtU4c+w8Ou9+raqg1QF8/0kmdjo53SP3TZrlorIwaXiBS6W+IQR4akCiI rG7FUfxuSFKmoJ7tWPeqZf8+kjvds/8XO0T2rtB0cz4dPEwV7Scdou4pHAexx3RG 8qP+JDwTwEOqrUk6jQGhN+VYT+sPdIRl/YxNSgzA8zQDK/OipSZE/oiDdy/q9tcI tLopJxs6jh0PCdFOZGt6NRHNunOFSWHl0Az6/S/bxtczGWSy+Zzx =Ahiq -----END PGP SIGNATURE-----