CXX compiler abort while building xpdf

Post Reply

Topic author
mberryman
Active Contributor
Posts: 43
Joined: Sat Sep 02, 2023 1:31 pm
Reputation: 0
Location: Colorado Springs, CO, USA
Status: Offline

CXX compiler abort while building xpdf

Post by mberryman » Tue Aug 13, 2024 11:12 am

While trying to build xpdf v3.04 I get the following error (same issue on both V9.2-2 and E9.2-3). There are no errors when building on Alpha or Integrity.

Code: Select all

$ CXX/OPTIMIZE=(LEVEL=4,TUNE=HOST)/ARCH=HOST/NAMES=(AS_IS,SHORT)/POINTER=32/IEEE=DENORM/REPOSITORY=[.x86_64.CXX_REPOSITORY]/DEFINE=(VMS)/OBJECT=[.x86_64.OBJ]FoFiTrueType.obj [.fofi]FoFiTrueType.cc
fatal error: error in backend: cannot lower memory intrinsic in address space 270
Stack dump:
0.	Program arguments: $7$DKA0:[SYS0.SYSCOMMON.][SYSEXE]CXX$COMPILER.EXE --std=gnu++98 -names=as_is -names2=shortened -DVMS -pointer-size=32 -O4 -extern-model=relaxed_refdef -Wno-nonportable-inc
lude-path -isystem/CXX$SYSTEM_INCLUDE -isystem/CXX$USER_INCLUDE -x c++ -D__RTTI FREEWARE:[freeware.xpdf-3^.04.fofi]FoFiTrueType.cc;1 -oFREEWARE:[freeware.xpdf-3^.04.x86_64.OBJ]FoFiTrueType.obj 
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'FREEWARE:[freeware.xpdf-3^.04.fofi]FoFiTrueType.cc;1'.
4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN12FoFiTrueType8cvtSfntsEPU10ptr32_sptrFvPU10ptr32_sptrvPU10ptr32_sptrKciES1_PU10ptr32_sptr7GStringiPU10ptr32_sptri'
CXX$COMPILER: error: clang frontend command failed with exit code 70 (use -v to see invocation)
VSI C++ A10.1-2.240805
clang version 10.0.1 (git@bitbucket.org:vms_software/llvm-10.0.1.git 1e3972aa6d49533b81ee136553ec6867c04f8b78)
Build date: 08-05-2024
Target: x86_64-OpenVMS
Thread model: posix
InstalledDir: $7$DKA0:[SYS0.SYSCOMMON.][SYSEXE]
CXX$COMPILER: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
CXX$COMPILER: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
CXX$COMPILER: note: diagnostic msg: SYS$SCRATCH:FoFiTrueType-74d230.cpp
CXX$COMPILER: note: diagnostic msg: SYS$SCRATCH:FoFiTrueType-74d230.sh
CXX$COMPILER: note: diagnostic msg: 

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


jreagan
VSI Expert
Master
Posts: 207
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX compiler abort while building xpdf

Post by jreagan » Tue Aug 13, 2024 10:40 pm

Thanks. You can enter a bug report. I'll pass this along to the team.

Added in 2 minutes 37 seconds:
Can we get the reproducer files?


Topic author
mberryman
Active Contributor
Posts: 43
Joined: Sat Sep 02, 2023 1:31 pm
Reputation: 0
Location: Colorado Springs, CO, USA
Status: Offline

Re: CXX compiler abort while building xpdf

Post by mberryman » Thu Aug 15, 2024 11:30 am

The files needed to reproduce the error are attached. The compile command was reduced to:

$ cxx/names=(as_is,short)/pointer=32 FoFiTrueType.cc
Attachments
reproduce.zip
(102 KiB) Downloaded 37 times


jreagan
VSI Expert
Master
Posts: 207
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX compiler abort while building xpdf

Post by jreagan » Mon Aug 19, 2024 10:22 am

Thanks. I've passed it along.


jreagan
VSI Expert
Master
Posts: 207
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX compiler abort while building xpdf

Post by jreagan » Wed Aug 21, 2024 10:14 am

We've reproduced the issue and are working on it. An optimization inserted a call to memset which in turn becomes a call to OTS$FILL. The code-generator is confused about the pointer argument to OTS$FILL. It is a 32-bit pointer and it didn't know to sign-extend to 64; zero-extend to 64; or leave the top half undefined. (Of course, for OpenVMS, we want sign-extend to 64)

Post Reply