Bug 225345 - games/scummvm: clang 6 crashes during build
Summary: games/scummvm: clang 6 crashes during build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords: toolchain
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2018-01-20 19:46 UTC by Jan Beich
Modified: 2018-03-27 02:04 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (lme)


Attachments
engines/made/graphics.cpp (compressed, preprocessed) (86.86 KB, application/x-xz)
2018-01-20 19:46 UTC, Jan Beich
no flags Details
command line args (for clang 6.0) (10.22 KB, text/plain)
2018-01-20 19:47 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2018-01-20 19:46:07 UTC
Created attachment 189935 [details]
engines/made/graphics.cpp (compressed, preprocessed)

c++ -MMD -MF "engines/made/.deps/graphics.d" -MQ "engines/made/graphics.o" -MP -Wall -O2 -pipe -fno-strict-aliasing   -ansi -W -Wno-unused-parameter -Wconversion -pedantic -Wno-long-long -Wglobal-constructors -Wno-undefined-var-template -I/usr/local/include -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -fno-exceptions -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types -DHAVE_CONFIG_H -DSDL_BACKEND -DPOSIX -DDATA_PATH=\"/usr/local/share/scummvm\" -DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_ACCESS=STATIC_PLUGIN -DENABLE_ADL=STATIC_PLUGIN -DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2 -DENABLE_BBVS=STATIC_PLUGIN -DENABLE_CGE=STATIC_PLUGIN -DENABLE_CGE2=STATIC_PLUGIN -DENABLE_CINE=STATIC_PLUGIN -DENABLE_COMPOSER=STATIC_PLUGIN -DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRACI=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_DREAMWEB=STATIC_PLUGIN -DENABLE_FULLPIPE=STATIC_PLUGIN -DENABLE_GNAP=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN -DENABLE_HOPKINS=STATIC_PLUGIN -DENABLE_HUGO=STATIC_PLUGIN -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL -DENABLE_EOB -DENABLE_LAB=STATIC_PLUGIN -DENABLE_LURE=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN -DENABLE_MADS=STATIC_PLUGIN -DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_MYST -DENABLE_RIVEN -DENABLE_MORTEVIELLE=STATIC_PLUGIN -DENABLE_NEVERHOOD=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN -DENABLE_PEGASUS=STATIC_PLUGIN -DENABLE_PLUMBERS=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN -DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM -DENABLE_SCI=STATIC_PLUGIN -DENABLE_SCI32 -DENABLE_SHERLOCK=STATIC_PLUGIN -DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN -DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_SWORD25=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN -DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TITANIC=STATIC_PLUGIN -DENABLE_TOLTECS=STATIC_PLUGIN -DENABLE_TONY=STATIC_PLUGIN -DENABLE_TOON=STATIC_PLUGIN -DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TSAGE=STATIC_PLUGIN -DENABLE_TUCKER=STATIC_PLUGIN -DENABLE_VOYEUR=STATIC_PLUGIN -DENABLE_WINTERMUTE=STATIC_PLUGIN -DENABLE_ZVISION=STATIC_PLUGIN -I. -I. -I./engines -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include   -I/usr/include  -I/usr/local/include/freetype2 -c engines/made/graphics.cpp -o engines/made/graphics.o
Assertion failed: (ExitCount != SE.getCouldNotCompute() && "Invalid loop count"), function generateOverflowCheck, file /usr/local/poudriere/jails/head-arm64/usr/src/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp, line 2152.
c++: error: unable to execute command: Abort trap (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 6.0.0 (branches/release_60 321788) (based on LLVM 6.0.0)
Target: aarch64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

http://thunderx1.nyi.freebsd.org/data/head-arm64-default/p458948_s327953/logs/errors/scummvm-2.0.0.log

To reproduce:
$ poudriere jail -cxj head-aarch64 -a arm64.aarch64 -v head -m svn+https
$ poudriere bulk -Ctj head-aarch64 games/scummvm
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-01-20 19:47:00 UTC
Created attachment 189936 [details]
command line args (for clang 6.0)
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2018-01-21 20:57:20 UTC
Reproduces with clang trunk, this regressed with https://reviews.llvm.org/rL313012 ("[LAA] Allow more run-time alias checks by coercing pointer expressions to AddRecExprs").

I filed an upstream bug: https://bugs.llvm.org/show_bug.cgi?id=36032
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2018-03-24 13:41:29 UTC
(In reply to Dimitry Andric from comment #2)
> Reproduces with clang trunk, this regressed with
> https://reviews.llvm.org/rL313012 ("[LAA] Allow more run-time alias checks
> by coercing pointer expressions to AddRecExprs").
> 
> I filed an upstream bug: https://bugs.llvm.org/show_bug.cgi?id=36032

Jan, it looks like the upstream fix (or rather, the temp workaround) landed in the 6.0 branch here: https://reviews.llvm.org/rL325773, so this bug can hopefully be closed?  Can you please check whether scummvm now builds for aarch64?
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-03-27 02:04:02 UTC
I confirm, builds fine on aarch64 now. Upstream fix was backported via base r329983.

http://thunderx1.nyi.freebsd.org/data/head-arm64-default/p464744_s331078/logs/scummvm-2.0.0.log
local base r331579 snapshot: https://ptpb.pw/ORH_