llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.42k stars 11.74k forks source link

Crash when compiling Unreal Engine #26343

Closed llvmbot closed 2 years ago

llvmbot commented 8 years ago
Bugzilla Link 25969
Resolution INVALID
Resolved on Mar 11, 2016 02:14
Version 3.7
OS Linux
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@XapaJIaMnu,@pogo59,@rnk

Extended Description

Please look at attachment.

OS: Arch/Manjaro Linux, x86-64, i7 3770k

llvmbot commented 2 years ago

mentioned in issue llvm/llvm-bugzilla-archive#26079

llvmbot commented 8 years ago

Fair enough. Thanks for looking this.

rnk commented 8 years ago

I can confirm that https://projects.archlinux.org/svntogit/packages.git/tree/trunk/clang-3.7.0- add-gcc-abi-tag-support.patch?h=packages/llvm is causing the crash. The patch was taken from http://reviews.llvm.org/D12834 , https://llvm.org/bugs/show_bug.cgi?id=23529 .

If that patch was not applied upstream, then this is not an actionable bug for us. If you care about gcc_abi attribute support, follow http://llvm.org/pr23529 instead.

llvmbot commented 8 years ago

I can confirm that https://projects.archlinux.org/svntogit/packages.git/tree/trunk/clang-3.7.0-add-gcc-abi-tag-support.patch?h=packages/llvm is causing the crash. The patch was taken from http://reviews.llvm.org/D12834 , https://llvm.org/bugs/show_bug.cgi?id=23529 .

llvmbot commented 8 years ago

(the compilation is possible, just run the compilaton once again)

Now I'm not possible to compile UE4 by compiling again (it worked last time when I tried)...

I think that this patch causes the crash: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/clang-3.7.0-add-gcc-abi-tag-support.patch?h=packages/llvm but I'm not sure. I'll recompile clang+llvm without this and I'll try whether it crashes. See: https://llvm.org/bugs/show_bug.cgi?id=23529 http://reviews.llvm.org/D12834

llvmbot commented 8 years ago

The "test-a50d6e.sh" doesn't crash anymore on Arch/Manjaro Linux (clang+llvm 3.7.1), but the "Module-32cf37" from http://sendfile.es/pokaz/630150---qw5t.html still crashes on Arch/Manjaro llvm+clang package. This test (Module-32cf37) doesn't crash on Arch/Manjaro with llvm+clang downloaded from http://llvm.org/releases/3.7.1/clang+llvm-3.7.1-x86_64-opensuse13.2.tar.xz . I'm able to compile UnrealEngine with "clang+llvm-3.7.1-x86_64-opensuse13.2.tar.xz" without any problems, but using clang+llvm from distribution package I've got a crash (the compilation is possible, just run the compilaton once again).

Arch Linux uses additional patches which probably causes the crash, please take a look at https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/llvm

llvmbot commented 8 years ago

This does not crash with a recent clang.

$ source test-a50d6e.sh In file included from test.cpp:1: In file included from /usr/bin/../include/c++/v1/iostream:38: In file included from /usr/bin/../include/c++/v1/ios:216: In file included from /usr/bin/../include/c++/v1/locale:15: /usr/bin/../include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible::value)' basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& a) ^ /usr/bin/../include/c++/v1/string:1326:40: note: previous declaration is here _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ 1 error generated.

Exception specification handling has changed since 3.7, and I think this has been fixed.

It is not fixed. Just tried to compile UnrealEngine 4 on 3.7.1 and it crashes with exactly same messages on 5-10 files of 872.

It is better to reopen this bug and to investigate where is the problem. It looks like minimal example is difficult to make but this does not make this bug fixed because the problem still exists and annoys people.

llvmbot commented 8 years ago

This does not crash with a recent clang.

$ source test-a50d6e.sh In file included from test.cpp:1: In file included from /usr/bin/../include/c++/v1/iostream:38: In file included from /usr/bin/../include/c++/v1/ios:216: In file included from /usr/bin/../include/c++/v1/locale:15: /usr/bin/../include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible::value)' basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& a) ^ /usr/bin/../include/c++/v1/string:1326:40: note: previous declaration is here _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ 1 error generated.

Exception specification handling has changed since 3.7, and I think this has been fixed.

It is not fixed. Just tried to compile UnrealEngine 4 on 3.7.1 and it crashes with exactly same messages on 5-10 files of 872.

rnk commented 8 years ago

This does not crash with a recent clang.

$ source test-a50d6e.sh In file included from test.cpp:1: In file included from /usr/bin/../include/c++/v1/iostream:38: In file included from /usr/bin/../include/c++/v1/ios:216: In file included from /usr/bin/../include/c++/v1/locale:15: /usr/bin/../include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible::value)' basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& a) ^ /usr/bin/../include/c++/v1/string:1326:40: note: previous declaration is here _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ 1 error generated.

Exception specification handling has changed since 3.7, and I think this has been fixed.

llvmbot commented 8 years ago

I am experiencing this on Fedora 23 with Clang 3.7.0-4.fc23. I don't think this is simply a Arch packaging issue as I am getting the exact same crash when trying to compile UE4.

llvmbot commented 8 years ago

Ok, now I tried LLVM+Clang 3.7.0 downloaded for openSUSE 13.2 from LLVM page and it doesn't crash (test-a50d6e). So this is Arch Linux packaging problem...

1368cc11-2b3e-4014-a3d8-3f2e316c0b54 commented 8 years ago

I was using the Ubuntu 3.7.0 binary downloaded from llvm.org. Also a 3.7.0 that I built myself from tags/RELEASE_370/final as reported in the console log. I didn't see anything labeled "Minjaro" on llvm.org, so I don't know where your compiler came from.

My compiler came from Arch Linux official package. It is built with the following patches:

Backport LLVM_LINK_LLVM_DYLIB option

https://bugs.archlinux.org/task/46392

patch -Np1 -i ../llvm-3.7.0-link-tools-against-libLLVM.patch

https://llvm.org/bugs/show_bug.cgi?id=24157

patch -Np2 -i ../llvm-3.7.0-export-more-symbols.patch

https://llvm.org/bugs/show_bug.cgi?id=23529

http://reviews.llvm.org/D12834

patch -d tools/clang -Np0 <../clang-3.7.0-add-gcc-abi-tag-support.patch

https://llvm.org/bugs/show_bug.cgi?id=24046

Upstreamed - http://reviews.llvm.org/D13206

patch -d tools/clang/tools/extra -Np1 <../clang-tools-extra-3.7.0-install-clang-query.patch

https://llvm.org/bugs/show_bug.cgi?id=24953

patch -d tools/lldb -Np1 <../lldb-3.7.0-avoid-linking-to-libLLVM.patch

https://llvm.org/bugs/show_bug.cgi?id=24155

patch -Np1 -i ../0001-New-MSan-mapping-layout-llvm-part.patch patch -d projects/compiler-rt -Np1 <../0001-New-MSan-mapping-layout-compiler-rt-part.patch

https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/llvm

pogo59 commented 8 years ago

I was using the Ubuntu 3.7.0 binary downloaded from llvm.org. Also a 3.7.0 that I built myself from tags/RELEASE_370/final as reported in the console log. I didn't see anything labeled "Minjaro" on llvm.org, so I don't know where your compiler came from.

1368cc11-2b3e-4014-a3d8-3f2e316c0b54 commented 8 years ago

On Ubuntu 14.04, I was unable to reproduce the crash. I tried test-a50d6e.cpp and several of the modules from comment 6.

I don't know what to suggest, sorry. I'll leave the bug open though.

Are you using the same version of clang as the one packaged on Arch? Arch is a bit out of date (using 3.7). Did you use 3.7.1? If it crashes with 3.7 but works with 3.7.1 I would be happy to mark this as resolved.

1368cc11-2b3e-4014-a3d8-3f2e316c0b54 commented 8 years ago

On Ubuntu 14.04, I was unable to reproduce the crash. I tried test-a50d6e.cpp and several of the modules from comment 6.

I don't know what to suggest, sorry. I'll leave the bug open though.

Are you using the same version of clang as the one packaged on Arch? Arch is a bit out of date (using 3.7). Did you use 3.7.1? If it crashes with 3.7 but works with 3.7.1 I would be happy to mark this as resolved.

pogo59 commented 8 years ago

On Ubuntu 14.04, I was unable to reproduce the crash. I tried test-a50d6e.cpp and several of the modules from comment 6.

I don't know what to suggest, sorry. I'll leave the bug open though.

1368cc11-2b3e-4014-a3d8-3f2e316c0b54 commented 8 years ago

Here are the related files that clang asked me to attach from the console log I submitted earlier. I had to upload them to an external server, cause they are 9 MB after compression:

http://homepages.inf.ed.ac.uk/s1031254/related_files_arch.tar.bz2

llvmbot commented 8 years ago

Crash with libc++ I can also crash clang 3.7 with libc++ 3.7 only by including iostream (see attachment test-a50d6e.tar.gz).

1368cc11-2b3e-4014-a3d8-3f2e316c0b54 commented 8 years ago

Console output from segfault I think I am experiencing the same bug, a segfault when compiling Unreal engine.

Here's my output:

llvmbot commented 8 years ago

Console output

llvmbot commented 8 years ago

Sorry, the attachment was too big. Uploaded here: http://sendfile.es/pokaz/630150---qw5t.html

pogo59 commented 8 years ago

Please look at attachment.

Don't see an attachment...