[llvm-bugs] [Bug 52295] New: <eof> parser at end of file

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 25 08:34:57 PDT 2021


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

            Bug ID: 52295
           Summary: <eof> parser at end of file
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kallisti5 at unixzen.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 25390
  --> https://bugs.llvm.org/attachment.cgi?id=25390&action=edit
heap-832c38.cpp / heap-832c38.sh per clang diagnostic msg

../src/system/kernel/heap.cpp:2485:27: warning: requested alignment is not a
power of 2 [-Wnon-power-of-two-alignment]
        void *address = memalign(0, numElements * size);
                                 ^
../src/system/kernel/heap.cpp:129:21: warning: unused variable
'kAreaAllocationMagic' [-Wunused-const-variable]
static const uint32 kAreaAllocationMagic = 'AAMG';
                    ^
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 -target x86_64-unknown-haiku -B llvm- -c
../src/system/kernel/heap.cpp -O2 -Wall -Wno-multichar -Wpointer-arith
-Wsign-compare -Wno-ctor-dtor-privacy -Woverloaded-virtual
-Wno-address-of-packed-member -Wno-unused-private-field -Wno-cast-align
-Wno-gnu-designator -Wno-builtin-requires-header -DHAIKU_ARCH=\"x86_64\"
-fno-strict-aliasing -fno-delete-null-pointer-checks -fno-builtin-fork
-fno-builtin-vfork -fPIC -nostdinc -finline -fno-builtin -Wno-main
-ffreestanding -fno-exceptions -mno-red-zone -fno-omit-frame-pointer -fno-pic
-mcmodel=kernel -D_KERNEL_MODE -DARCH_x86_64
-D__HAIKU_PRIMARY_PACKAGING_ARCH=\"x86_64\"
-DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_TARGET_PLATFORM_HAIKU
-DHAIKU_MINIMUM_BUILD -iquote ../build/user_config_headers -iquote
../build/config_headers -iquote ../src/system/kernel -iquote
objects/common/system/kernel -iquote objects/linux/x86_64/common/system/kernel
-iquote objects/haiku/x86_64/common/system/kernel -iquote
../src/system/kernel/locks -iquote ../src/system/kernel/scheduler -I
../headers/private/libroot -I ../headers/private/shared -I
../headers/private/runtime_loader -I ../headers/private/. -I
../headers/private/kernel -I ../headers/private/libroot -I
../headers/private/shared -I ../headers/private/kernel/boot/platform/bios_ia32
-I ../headers/private/kernel/arch/x86 -I
objects/haiku/x86_64/common/system/kernel -I ../headers/private/. -I
../headers/private/system -I ../headers/private/system/arch/x86_64 -I
clang_headers -I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++/x86_64-unknown-haiku
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++/backward
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++/ext
-I ../headers/glibc -I ../headers/posix -I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/gcc/include
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/gcc/include-fixed
-I ../headers -I ../headers/os -I ../headers/os/add-ons -I
../headers/os/add-ons/file_system -I ../headers/os/add-ons/graphics -I
../headers/os/add-ons/input_server -I ../headers/os/add-ons/registrar -I
../headers/os/add-ons/screen_saver -I ../headers/os/add-ons/tracker -I
../headers/os/app -I ../headers/os/device -I ../headers/os/drivers -I
../headers/os/game -I ../headers/os/interface -I ../headers/os/kernel -I
../headers/os/locale -I ../headers/os/media -I ../headers/os/mail -I
../headers/os/midi -I ../headers/os/midi2 -I ../headers/os/net -I
../headers/os/storage -I ../headers/os/support -I ../headers/os/translation -I
../headers/private/. -o objects/haiku/x86_64/release/system/kernel/heap.o
1.      <eof> parser at end of file
2.      Per-function optimization
3.      Running pass 'Early CSE' on function '@calloc'
 #0 0x00007f4349836793 (/usr/bin/../lib/libLLVM-12.so+0xb49793)
 #1 0x00007f4349834304 llvm::sys::CleanupOnSignal(unsigned long)
(/usr/bin/../lib/libLLVM-12.so+0xb47304)
 #2 0x00007f4349745239 (/usr/bin/../lib/libLLVM-12.so+0xa58239)
 #3 0x00007f4348947da0 __restore_rt (/usr/bin/../lib/libc.so.6+0x3cda0)
 #4 0x00007f43497140f3 llvm::APInt::setBitsSlowCase(unsigned int, unsigned int)
(/usr/bin/../lib/libLLVM-12.so+0xa270f3)
 #5 0x00007f434b03f7eb (/usr/bin/../lib/libLLVM-12.so+0x23527eb)
 #6 0x00007f434b046777 (/usr/bin/../lib/libLLVM-12.so+0x2359777)
 #7 0x00007f434b04924d llvm::isKnownNonZero(llvm::Value const*,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::Instruction const*, llvm::DominatorTree const*, bool)
(/usr/bin/../lib/libLLVM-12.so+0x235c24d)
 #8 0x00007f434ae8416b (/usr/bin/../lib/libLLVM-12.so+0x219716b)
 #9 0x00007f434ae8e1df (/usr/bin/../lib/libLLVM-12.so+0x21a11df)
#10 0x00007f434ae9bc54 llvm::SimplifyInstruction(llvm::Instruction*,
llvm::SimplifyQuery const&, llvm::OptimizationRemarkEmitter*)
(/usr/bin/../lib/libLLVM-12.so+0x21aec54)
#11 0x00007f434a829423 (/usr/bin/../lib/libLLVM-12.so+0x1b3c423)
#12 0x00007f434a82cbb8 (/usr/bin/../lib/libLLVM-12.so+0x1b3fbb8)
#13 0x00007f4349992af0 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/bin/../lib/libLLVM-12.so+0xca5af0)
#14 0x00007f4349992cd4
llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&)
(/usr/bin/../lib/libLLVM-12.so+0xca5cd4)
#15 0x00007f43508302a4 (/usr/bin/../lib/libclang-cpp.so.12+0x18982a4)
#16 0x00007f4350832055 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<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/bin/../lib/libclang-cpp.so.12+0x189a055)
#17 0x00007f4350baf652 (/usr/bin/../lib/libclang-cpp.so.12+0x1c17652)
#18 0x00007f434f8cf669 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib/libclang-cpp.so.12+0x937669)
#19 0x00007f435131a2b9 clang::FrontendAction::Execute()
(/usr/bin/../lib/libclang-cpp.so.12+0x23822b9)
#20 0x00007f43512b15be
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/../lib/libclang-cpp.so.12+0x23195be)
#21 0x00007f435139a999
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/../lib/libclang-cpp.so.12+0x2402999)
#22 0x00005578b68e78de cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang-12+0x128de)
#23 0x00005578b68e4ee8 (/usr/bin/clang-12+0xfee8)
#24 0x00007f4350f83045 (/usr/bin/../lib/libclang-cpp.so.12+0x1feb045)
#25 0x00007f4349745343
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/bin/../lib/libLLVM-12.so+0xa58343)
#26 0x00007f4350f833f0 (/usr/bin/../lib/libclang-cpp.so.12+0x1feb3f0)
#27 0x00007f4350f57308
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/bin/../lib/libclang-cpp.so.12+0x1fbf308)
#28 0x00007f4350f57d99
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/bin/../lib/libclang-cpp.so.12+0x1fbfd99)
#29 0x00007f4350f67cca
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/bin/../lib/libclang-cpp.so.12+0x1fcfcca)
#30 0x00005578b68e2c13 main (/usr/bin/clang-12+0xdc13)
#31 0x00007f4348932b25 __libc_start_main (/usr/bin/../lib/libc.so.6+0x27b25)
#32 0x00005578b68e486e _start (/usr/bin/clang-12+0xf86e)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.1
Target: x86_64-unknown-haiku
Thread model: posix
InstalledDir: /usr/bin
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/heap-832c38.cpp
clang-12: note: diagnostic msg: /tmp/heap-832c38.sh
clang-12: note: diagnostic msg: 

********************

clang -target x86_64-unknown-haiku -B llvm- -c "../src/system/kernel/heap.cpp"
-O2 -Wall -Wno-multichar -Wpointer-arith -Wsign-compare -Wno-ctor-dtor-privacy
-Woverloaded-virtual -Wno-address-of-packed-member -Wno-unused-private-field
-Wno-cast-align -Wno-gnu-designator -Wno-builtin-requires-header
-DHAIKU_ARCH=\"x86_64\" -fno-strict-aliasing -fno-delete-null-pointer-checks
-fno-builtin-fork -fno-builtin-vfork -fPIC -nostdinc -finline -fno-builtin
-Wno-main -ffreestanding -fno-exceptions -mno-red-zone -fno-omit-frame-pointer
-fno-pic -mcmodel=kernel -D_KERNEL_MODE -DARCH_x86_64
-D__HAIKU_PRIMARY_PACKAGING_ARCH=\"x86_64\"
-DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_TARGET_PLATFORM_HAIKU
-DHAIKU_MINIMUM_BUILD -iquote ../build/user_config_headers -iquote
../build/config_headers -iquote ../src/system/kernel -iquote
objects/common/system/kernel -iquote objects/linux/x86_64/common/system/kernel
-iquote objects/haiku/x86_64/common/system/kernel -iquote
../src/system/kernel/locks -iquote ../src/system/kernel/scheduler -I
../headers/private/libroot -I ../headers/private/shared -I
../headers/private/runtime_loader -I ../headers/private/. -I
../headers/private/kernel -I ../headers/private/libroot -I
../headers/private/shared -I ../headers/private/kernel/boot/platform/bios_ia32
-I ../headers/private/kernel/arch/x86 -I
objects/haiku/x86_64/common/system/kernel -I ../headers/private/. -I
../headers/private/system -I ../headers/private/system/arch/x86_64 -I
clang_headers -I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++/x86_64-unknown-haiku
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++/backward
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/c++/ext
-I ../headers/glibc -I ../headers/posix -I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/gcc/include
-I
build_packages/gcc_syslibs_devel-8.3.0_2019_05_24-13-x86_64/develop/headers/gcc/include-fixed
-I ../headers -I ../headers/os -I ../headers/os/add-ons -I
../headers/os/add-ons/file_system -I ../headers/os/add-ons/graphics -I
../headers/os/add-ons/input_server -I ../headers/os/add-ons/registrar -I
../headers/os/add-ons/screen_saver -I ../headers/os/add-ons/tracker -I
../headers/os/app -I ../headers/os/device -I ../headers/os/drivers -I
../headers/os/game -I ../headers/os/interface -I ../headers/os/kernel -I
../headers/os/locale -I ../headers/os/media -I ../headers/os/mail -I
../headers/os/midi -I ../headers/os/midi2 -I ../headers/os/net -I
../headers/os/storage -I ../headers/os/support -I ../headers/os/translation -I
../headers/private/. -o "objects/haiku/x86_64/release/system/kernel/heap.o"

...failed C++ objects/haiku/x86_64/release/system/kernel/heap.o ...

BUILD FAILURE:
...failed updating 1 target(s)...
...skipped 18 target(s)...
...updated 1517 target(s)...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211025/e0ac3538/attachment-0001.html>


More information about the llvm-bugs mailing list