Bug 225278 - mail/deforaos-mailer: clang 5 crashes during build
Summary: mail/deforaos-mailer: clang 5 crashes during build
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Olivier Cochard
URL:
Keywords: toolchain
Depends on:
Blocks: 219139
  Show dependency treegraph
 
Reported: 2018-01-17 19:16 UTC by Jan Beich
Modified: 2019-01-07 19:14 UTC (History)
4 users (show)

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


Attachments
src/message.c (compressed, preprocessed) (673.22 KB, application/x-xz)
2018-01-17 19:16 UTC, Jan Beich
no flags Details
command line args (for clang 6.0) (3.11 KB, text/plain)
2018-01-17 19:16 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 2018-01-17 19:16:05 UTC
Created attachment 189856 [details]
src/message.c (compressed, preprocessed)

cc   -W `pkg-config --cflags libDesktop` -Wall -g -O2 -pedantic -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-all -o message.o -c message.c

# Machine code for function message_set_header_value: NoPHIs, TracksLiveness
Frame Objects:
  fi#0: size=4, align=4, at location [SP]
Function Live Ins: %r0 in %18, %r1 in %19, %r2 in %20

%bb.0: derived from LLVM BB %entry
    Live Ins: %r0 %r1 %r2
	DBG_VALUE debug-use %r0, debug-use %noreg, !"message", !DIExpression(); line no:310
	DBG_VALUE debug-use %r1, debug-use %noreg, !"header", !DIExpression(); line no:310
	DBG_VALUE debug-use %r2, debug-use %noreg, !"value", !DIExpression(); line no:311
	DBG_VALUE debug-use %r2, debug-use %noreg, !"value", !DIExpression(); line no:556 inlined @[ message.c:342:10 ]
	DBG_VALUE debug-use %r1, debug-use %noreg, !"header", !DIExpression(); line no:555 inlined @[ message.c:338:6 ]
	DBG_VALUE debug-use %r2, debug-use %noreg, !"value", !DIExpression(); line no:556 inlined @[ message.c:338:6 ]
	%20:gpr = COPY killed %r2; GPR:%20
	DBG_VALUE debug-use %20, debug-use %noreg, !"value", !DIExpression(); GPR:%20 line no:311
	DBG_VALUE debug-use %20, debug-use %noreg, !"value", !DIExpression(); GPR:%20 line no:556 inlined @[ message.c:342:10 ]
	DBG_VALUE debug-use %20, debug-use %noreg, !"value", !DIExpression(); GPR:%20 line no:556 inlined @[ message.c:338:6 ]
	%19:gpr = COPY killed %r1; GPR:%19
	DBG_VALUE debug-use %19, debug-use %noreg, !"header", !DIExpression(); GPR:%19 line no:310
	DBG_VALUE debug-use %19, debug-use %noreg, !"header", !DIExpression(); GPR:%19 line no:555 inlined @[ message.c:338:6 ]
	%18:gpr = COPY killed %r0; GPR:%18
	DBG_VALUE debug-use %18, debug-use %noreg, !"message", !DIExpression(); GPR:%18 line no:310
	%22:gpr = LDRLIT_ga_pcrel_ldr target-flags(<unknown>) @__stack_chk_guard; mem:LD4[GOT] GPR:%22 dbg:message.c:310:40
	%23:gpr = LDRi12 %22, 0, pred:14, pred:%noreg; mem:Volatile LD4[@__stack_chk_guard] GPR:%23,%22 dbg:message.c:310:40
	STRi12 %23, %stack.0.StackGuardSlot, 0, pred:14, pred:%noreg; mem:Volatile ST4[FixedStack0] GPR:%23 dbg:message.c:310:40
	DBG_VALUE 0, debug-use %noreg, !"i", !DIExpression(); line no:313
	DBG_VALUE 0, debug-use %noreg, !"i", !DIExpression(); line no:313
	%0:gpr = LDRi12 %18, 16, pred:14, pred:%noreg; mem:LD4[%headers_cnt](tbaa=!311) GPR:%0,%18 dbg:message.c:322:26
	%21:gpr = MOVi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%21
	CMPri %0, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%0 dbg:message.c:322:2
	%79:gpr = COPY %21; GPR:%79,%21
	Bcc %bb.5, pred:0, pred:killed %cpsr; dbg:message.c:322:2
	B %bb.1; dbg:message.c:322:2
    Successors according to CFG: %bb.5(0x30000000 / 0x80000000 = 37.50%) %bb.1(0x50000000 / 0x80000000 = 62.50%)

%bb.1: derived from LLVM BB %for.body.lr.ph
    Predecessors according to CFG: %bb.0
	%1:gpr = LDRi12 %18, 12, pred:14, pred:%noreg; mem:LD4[%headers](tbaa=!311) GPR:%1,%18
	%24:gpr = MOVi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%24
	%77:gprnopc = COPY %24; GPRnopc:%77 GPR:%24
    Successors according to CFG: %bb.2(?%)

%bb.2: derived from LLVM BB %for.body
    Predecessors according to CFG: %bb.1 %bb.3
	%2:gprnopc = COPY %77; GPRnopc:%2,%77
	DBG_VALUE debug-use %2, debug-use %noreg, !"i", !DIExpression(); GPRnopc:%2 line no:313
	%25:gpr = LDRrs %1, %2, 16387, pred:14, pred:%noreg; mem:LD4[%scevgep](tbaa=!542) GPR:%25,%1 GPRnopc:%2 dbg:message.c:323:33
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:323:6
	%r0 = COPY %25; GPR:%25 dbg:message.c:323:6
	%r1 = COPY %19; GPR:%19 dbg:message.c:323:6
	BL @strcmp, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:323:6
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:323:6
	%26:gpr = COPY %r0; GPR:%26 dbg:message.c:323:6
	CMPri %26, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%26 dbg:message.c:323:6
	Bcc %bb.3, pred:1, pred:killed %cpsr; dbg:message.c:323:6
    Successors according to CFG: %bb.34(0x04000000 / 0x80000000 = 3.12%) %bb.3(0x7c000000 / 0x80000000 = 96.88%)

%bb.34: 
    Predecessors according to CFG: %bb.2
	%78:gpr = COPY %2; GPR:%78 GPRnopc:%2
	B %bb.4
    Successors according to CFG: %bb.4(?%)

%bb.3: derived from LLVM BB %for.inc
    Predecessors according to CFG: %bb.2
	%3:gpr = ADDri %2, 1, pred:14, pred:%noreg, opt:%noreg; GPR:%3 GPRnopc:%2 dbg:message.c:322:40
	DBG_VALUE debug-use %3, debug-use %noreg, !"i", !DIExpression(); GPR:%3 line no:313
	CMPrr %3, %0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%3,%0 dbg:message.c:322:2
	%77:gprnopc = COPY %3; GPRnopc:%77 GPR:%3
	%78:gpr = COPY %3; GPR:%78,%3
	Bcc %bb.2, pred:3, pred:killed %cpsr; dbg:message.c:322:2
	B %bb.4; dbg:message.c:322:2
    Successors according to CFG: %bb.2(0x7c000000 / 0x80000000 = 96.88%) %bb.4(0x04000000 / 0x80000000 = 3.12%)

%bb.4: derived from LLVM BB %for.end
    Predecessors according to CFG: %bb.3 %bb.34
	%4:gpr = COPY %78; GPR:%4,%78
	CMPrr %4, %0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%4,%0 dbg:message.c:325:5
	Bcc %bb.15, pred:1, pred:killed %cpsr; dbg:message.c:325:5
    Successors according to CFG: %bb.35(0x40000000 / 0x80000000 = 50.00%) %bb.15(0x40000000 / 0x80000000 = 50.00%)

%bb.35: 
    Predecessors according to CFG: %bb.4
	%79:gpr = COPY %4; GPR:%79,%4
    Successors according to CFG: %bb.5(?%)

%bb.5: derived from LLVM BB %if.then5
    Predecessors according to CFG: %bb.0 %bb.35
	%5:gpr = COPY %79; GPR:%5,%79
	CMPri %20, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%20 dbg:message.c:328:6
	%83:gpr = COPY %21; GPR:%83,%21
	Bcc %bb.27, pred:0, pred:killed %cpsr; dbg:message.c:328:6
	B %bb.6; dbg:message.c:328:6
    Successors according to CFG: %bb.27(0x30000000 / 0x80000000 = 37.50%) %bb.6(0x50000000 / 0x80000000 = 62.50%)

%bb.6: derived from LLVM BB %if.end8
    Predecessors according to CFG: %bb.5
	%33:gpr = MOVi 8, pred:14, pred:%noreg, opt:%noreg; GPR:%33 dbg:message.c:332:7
	%34:gpr = ADDrsi %33, %5, 26, pred:14, pred:%noreg, opt:%noreg; GPR:%34,%33,%5 dbg:message.c:332:7
	%35:gpr = LDRi12 %18, 12, pred:14, pred:%noreg; mem:LD4[%6](tbaa=!311) GPR:%35,%18 dbg:message.c:331:28
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:331:11
	%r0 = COPY %35; GPR:%35 dbg:message.c:331:11
	%r1 = COPY %34; GPR:%34 dbg:message.c:331:11
	BL @realloc, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:331:11
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:331:11
	%36:gpr = COPY %r0; GPR:%36 dbg:message.c:331:11
	%32:gpr = MVNi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%32
	CMPri %36, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%36 dbg:message.c:331:6
	Bcc %bb.7, pred:1, pred:killed %cpsr; dbg:message.c:331:6
    Successors according to CFG: %bb.36(0x30000000 / 0x80000000 = 37.50%) %bb.7(0x50000000 / 0x80000000 = 62.50%)

%bb.36: 
    Predecessors according to CFG: %bb.6
	%83:gpr = COPY %32; GPR:%83,%32
	B %bb.27
    Successors according to CFG: %bb.27(?%)

%bb.7: derived from LLVM BB %if.end14
    Predecessors according to CFG: %bb.6
	%6:gpr = COPY %36; GPR:%6,%36
	%7:gprnopc = LDRi12 %18, 16, pred:14, pred:%noreg; mem:LD4[%12](tbaa=!311) GPRnopc:%7 GPR:%18 dbg:message.c:336:34
	DBG_VALUE debug-use %6, debug-use %noreg, !"p", !DIExpression(); GPR:%6 line no:314
	STRi12 %6, %18, 12, pred:14, pred:%noreg; mem:ST4[%10](tbaa=!311) GPR:%6,%18 dbg:message.c:335:20
	%38:gpr = MOVi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%38
	DBG_VALUE debug-use %8, debug-use %noreg, !"mh", !DIExpression(); GPR:%8 line no:555 inlined @[ message.c:338:6 ]
	DBG_VALUE debug-use %8, debug-use %noreg, !"p", !DIExpression(); GPR:%8 line no:314
	DBG_VALUE debug-use %38, debug-use %noreg, !"v", !DIExpression(); GPR:%38 line no:560 inlined @[ message.c:338:6 ]
	%8:gpr = COPY %6; GPR:%8,%6 dbg:message.c:337:3
	early-clobber %8:gpr = STR_PRE_REG %38, %8, %7, 16387, pred:14, pred:%noreg; GPR:%8,%38 GPRnopc:%7 dbg:message.c:337:3
	DBG_VALUE 0, debug-use %noreg, !"ret", !DIExpression(); line no:558 inlined @[ message.c:338:6 ]
	STRi12 %38, %8, 4, pred:14, pred:%noreg; mem:ST4[%14+4] GPR:%38,%8 dbg:message.c:337:3
	CMPri %19, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%19 dbg:message.c:562:20 @[ message.c:338:6 ]
	Bcc %bb.9, pred:1, pred:killed %cpsr; dbg:message.c:562:20 @[ message.c:338:6 ]
    Successors according to CFG: %bb.8(0x30000000 / 0x80000000 = 37.50%) %bb.9(0x50000000 / 0x80000000 = 62.50%)

%bb.8: 
    Predecessors according to CFG: %bb.7
	%37:gpr = MOVi 1, pred:14, pred:%noreg, opt:%noreg; GPR:%37
	%80:gpr = COPY %37; GPR:%80,%37
	%81:gpr = COPY %38; GPR:%81,%38
	B %bb.10
    Successors according to CFG: %bb.10(?%)

%bb.9: derived from LLVM BB %land.lhs.true.i
    Predecessors according to CFG: %bb.7
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:562:28 @[ message.c:338:6 ]
	%r0 = COPY %19; GPR:%19 dbg:message.c:562:28 @[ message.c:338:6 ]
	BL @strdup, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit-def %sp, implicit-def %r0; dbg:message.c:562:28 @[ message.c:338:6 ]
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:562:28 @[ message.c:338:6 ]
	%39:gpr = COPY %r0; GPR:%39 dbg:message.c:562:28 @[ message.c:338:6 ]
	DBG_VALUE debug-use %39, debug-use %noreg, !"h", !DIExpression(); GPR:%39 line no:559 inlined @[ message.c:338:6 ]
	CMPri %39, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%39 dbg:message.c:562:44 @[ message.c:338:6 ]
	%10:gpr = COPY %39; GPR:%10,%39 dbg:message.c:562:44 @[ message.c:338:6 ]
	%10:gpr = MOVCCi %10, 1, pred:1, pred:killed %cpsr; GPR:%10 dbg:message.c:562:44 @[ message.c:338:6 ]
	%9:gpr = COPY %39; GPR:%9,%39 dbg:message.c:562:28 @[ message.c:338:6 ]
	%80:gpr = COPY %10; GPR:%80,%10
	%81:gpr = COPY %9; GPR:%81,%9
    Successors according to CFG: %bb.10(?%)

%bb.10: derived from LLVM BB %land.lhs.true3.i
    Predecessors according to CFG: %bb.9 %bb.8
	%12:gpr = COPY %81; GPR:%12,%81
	%11:gpr = COPY %80; GPR:%11,%80
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:564:27 @[ message.c:338:6 ]
	%r0 = COPY %20; GPR:%20 dbg:message.c:564:27 @[ message.c:338:6 ]
	BL @strdup, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit-def %sp, implicit-def %r0; dbg:message.c:564:27 @[ message.c:338:6 ]
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:564:27 @[ message.c:338:6 ]
	%41:gpr = COPY %r0; GPR:%41 dbg:message.c:564:27 @[ message.c:338:6 ]
	DBG_VALUE debug-use %41, debug-use %noreg, !"v", !DIExpression(); GPR:%41 line no:560 inlined @[ message.c:338:6 ]
	DBG_VALUE debug-use %41, debug-use %noreg, !"v", !DIExpression(); GPR:%41 line no:560 inlined @[ message.c:338:6 ]
	CMPri %11, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%11
	Bcc %bb.11, pred:1, pred:killed %cpsr
    Successors according to CFG: %bb.11(0x60000000 / 0x80000000 = 75.00%) %bb.37(0x20000000 / 0x80000000 = 25.00%)

%bb.37: 
    Predecessors according to CFG: %bb.10
	%83:gpr = COPY %32; GPR:%83,%32
	B %bb.27
    Successors according to CFG: %bb.27(?%)

%bb.11: derived from LLVM BB %land.lhs.true3.i
    Predecessors according to CFG: %bb.10
	CMPri %41, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%41
	%83:gpr = COPY %32; GPR:%83,%32
	Bcc %bb.27, pred:0, pred:killed %cpsr
	B %bb.12
    Successors according to CFG: %bb.12(0x55555555 / 0x80000000 = 66.67%) %bb.27(0x2aaaaaab / 0x80000000 = 33.33%)

%bb.12: derived from LLVM BB %if.end11.i
    Predecessors according to CFG: %bb.11
	%13:gpr = COPY %41; GPR:%13,%41
	DBG_VALUE debug-use %12, debug-use %noreg, !"h", !DIExpression(); GPR:%12 line no:559 inlined @[ message.c:338:6 ]
	CMPri %12, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%12 dbg:message.c:568:5 @[ message.c:338:6 ]
	Bcc %bb.14, pred:0, pred:killed %cpsr; dbg:message.c:568:5 @[ message.c:338:6 ]
	B %bb.13; dbg:message.c:568:5 @[ message.c:338:6 ]
    Successors according to CFG: %bb.14(0x30000000 / 0x80000000 = 37.50%) %bb.13(0x50000000 / 0x80000000 = 62.50%)

%bb.13: derived from LLVM BB %if.then13.i
    Predecessors according to CFG: %bb.12
	%42:gpr = LDRi12 %8, 0, pred:14, pred:%noreg; mem:LD4[%header14.i130](tbaa=!542) GPR:%42,%8 dbg:message.c:570:12 @[ message.c:338:6 ]
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:570:3 @[ message.c:338:6 ]
	%r0 = COPY %42; GPR:%42 dbg:message.c:570:3 @[ message.c:338:6 ]
	BL @free, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit-def %sp; dbg:message.c:570:3 @[ message.c:338:6 ]
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:570:3 @[ message.c:338:6 ]
	STRi12 %12, %8, 0, pred:14, pred:%noreg; mem:ST4[%header14.i130](tbaa=!542) GPR:%12,%8 dbg:message.c:571:14 @[ message.c:338:6 ]
    Successors according to CFG: %bb.14(?%)

%bb.14: derived from LLVM BB %if.end22
    Predecessors according to CFG: %bb.12 %bb.13
	%43:gpr = ADDrsi %36, %7, 26, pred:14, pred:%noreg, opt:%noreg; GPR:%43,%36 GPRnopc:%7 dbg:message.c:575:12 @[ message.c:338:6 ]
	%44:gpr = LDRi12 %43, 4, pred:14, pred:%noreg; mem:LD4[%value19.i](tbaa=!542) GPR:%44,%43 dbg:message.c:575:12 @[ message.c:338:6 ]
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:575:3 @[ message.c:338:6 ]
	%r0 = COPY %44; GPR:%44 dbg:message.c:575:3 @[ message.c:338:6 ]
	BL @free, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit-def %sp; dbg:message.c:575:3 @[ message.c:338:6 ]
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:575:3 @[ message.c:338:6 ]
	STRi12 %13, %43, 4, pred:14, pred:%noreg; mem:ST4[%value19.i](tbaa=!542) GPR:%13,%43 dbg:message.c:576:13 @[ message.c:338:6 ]
	%45:gpr = LDRi12 %18, 16, pred:14, pred:%noreg; mem:LD4[%19](tbaa=!311) GPR:%45,%18 dbg:message.c:340:23
	%46:gpr = ADDri %45, 1, pred:14, pred:%noreg, opt:%noreg; GPR:%46,%45 dbg:message.c:340:23
	STRi12 %46, %18, 16, pred:14, pred:%noreg; mem:ST4[%19](tbaa=!311) GPR:%46,%18 dbg:message.c:340:23
	B %bb.19; dbg:message.c:341:2
    Successors according to CFG: %bb.19(?%)

%bb.15: derived from LLVM BB %if.else
    Predecessors according to CFG: %bb.4
	DBG_VALUE 0, debug-use %noreg, !"ret", !DIExpression(); line no:558 inlined @[ message.c:342:10 ]
	DBG_VALUE 0, debug-use %noreg, !"ret", !DIExpression(); line no:558 inlined @[ message.c:342:10 ]
	CMPri %20, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%20 dbg:message.c:564:19 @[ message.c:342:10 ]
	Bcc %bb.19, pred:0, pred:killed %cpsr; dbg:message.c:564:19 @[ message.c:342:10 ]
	B %bb.16; dbg:message.c:564:19 @[ message.c:342:10 ]
    Successors according to CFG: %bb.19(0x30000000 / 0x80000000 = 37.50%) %bb.16(0x50000000 / 0x80000000 = 62.50%)

%bb.16: derived from LLVM BB %land.lhs.true3.i98
    Predecessors according to CFG: %bb.15
	%14:gpr = LDRi12 %18, 12, pred:14, pred:%noreg; mem:LD4[%headers25](tbaa=!311) GPR:%14,%18
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:564:27 @[ message.c:342:10 ]
	%r0 = COPY %20; GPR:%20 dbg:message.c:564:27 @[ message.c:342:10 ]
	BL @strdup, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit-def %sp, implicit-def %r0; dbg:message.c:564:27 @[ message.c:342:10 ]
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:564:27 @[ message.c:342:10 ]
	%28:gpr = COPY %r0; GPR:%28 dbg:message.c:564:27 @[ message.c:342:10 ]
	DBG_VALUE debug-use %28, debug-use %noreg, !"v", !DIExpression(); GPR:%28 line no:560 inlined @[ message.c:342:10 ]
	DBG_VALUE debug-use %28, debug-use %noreg, !"v", !DIExpression(); GPR:%28 line no:560 inlined @[ message.c:342:10 ]
	CMPri %28, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%28
	Bcc %bb.18, pred:1, pred:killed %cpsr
    Successors according to CFG: %bb.17(0x30000000 / 0x80000000 = 37.50%) %bb.18(0x50000000 / 0x80000000 = 62.50%)

%bb.17: 
    Predecessors according to CFG: %bb.16
	%27:gpr = MVNi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%27
	%83:gpr = COPY %27; GPR:%83,%27
	B %bb.27
    Successors according to CFG: %bb.27(?%)

%bb.18: derived from LLVM BB %if.then18.i109
    Predecessors according to CFG: %bb.16
	%15:gpr = COPY %28; GPR:%15,%28
	DBG_VALUE 0, debug-use %noreg, !"ret", !DIExpression(); line no:558 inlined @[ message.c:342:10 ]
	%29:gpr = ADDrsi %14, %4, 26, pred:14, pred:%noreg, opt:%noreg; GPR:%29,%14,%4 dbg:message.c:575:12 @[ message.c:342:10 ]
	%30:gpr = LDRi12 %29, 4, pred:14, pred:%noreg; mem:LD4[%value19.i108](tbaa=!542) GPR:%30,%29 dbg:message.c:575:12 @[ message.c:342:10 ]
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:575:3 @[ message.c:342:10 ]
	%r0 = COPY %30; GPR:%30 dbg:message.c:575:3 @[ message.c:342:10 ]
	BL @free, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit-def %sp; dbg:message.c:575:3 @[ message.c:342:10 ]
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:575:3 @[ message.c:342:10 ]
	STRi12 %15, %29, 4, pred:14, pred:%noreg; mem:ST4[%value19.i108](tbaa=!542) GPR:%15,%29 dbg:message.c:576:13 @[ message.c:342:10 ]
    Successors according to CFG: %bb.19(?%)

%bb.19: derived from LLVM BB %if.end31
    Predecessors according to CFG: %bb.15 %bb.18 %bb.14
	DBG_VALUE 0, debug-use %noreg, !"i", !DIExpression(); line no:313
	DBG_VALUE 0, debug-use %noreg, !"i", !DIExpression(); line no:313
	%48:gpr = LDRLIT_ga_pcrel @.str.9; GPR:%48 dbg:message.c:347:6
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%r0 = COPY %48; GPR:%48 dbg:message.c:347:6
	%r1 = COPY %19; GPR:%19 dbg:message.c:347:6
	BL @strcmp, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:347:6
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%49:gpr = COPY %r0; GPR:%49 dbg:message.c:347:6
	CMPri %49, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%49 dbg:message.c:347:6
	Bcc %bb.25, pred:1, pred:killed %cpsr; dbg:message.c:347:6
    Successors according to CFG: %bb.20(0x30000000 / 0x80000000 = 37.50%) %bb.25(0x50000000 / 0x80000000 = 62.50%)

%bb.20: 
    Predecessors according to CFG: %bb.19
	%47:gpr = MOVi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%47
	%82:gpr = COPY %47; GPR:%82,%47
	B %bb.22
    Successors according to CFG: %bb.22(?%)

%bb.21: derived from LLVM BB %if.then46
    Predecessors according to CFG: %bb.31
	DBG_VALUE 4, debug-use %noreg, !"column", !DIExpression(); line no:315
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:350:4
	%63:gpr = MOVi 4, pred:14, pred:%noreg, opt:%noreg; GPR:%63 dbg:message.c:350:4
	%64:gpr = MVNi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%64 dbg:message.c:350:4
	%r0 = COPY %18; GPR:%18 dbg:message.c:350:4
	%r1 = COPY %63; GPR:%63 dbg:message.c:350:4
	%r2 = COPY %20; GPR:%20 dbg:message.c:350:4
	%r3 = COPY %64; GPR:%64 dbg:message.c:350:4
	BL_pred @_message_set, pred:14, pred:%noreg, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit killed %r2, implicit killed %r3, implicit-def %sp; dbg:message.c:350:4
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:350:4
	%62:gpr = MOVi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%62
	%83:gpr = COPY %62; GPR:%83,%62
	B %bb.27; dbg:message.c:351:6
    Successors according to CFG: %bb.27(?%)

%bb.22: derived from LLVM BB %if.end52
    Predecessors according to CFG: %bb.20 %bb.26 %bb.30 %bb.33
	%16:gpr = COPY %82; GPR:%16,%82
	DBG_VALUE 4, debug-use %noreg, !"column", !DIExpression(); line no:315
	%70:gpr = LDRi12 %22, 0, pred:14, pred:%noreg; mem:Volatile LD4[@__stack_chk_guard] GPR:%70,%22
	%71:gpr = LDRi12 %stack.0.StackGuardSlot, 0, pred:14, pred:%noreg; mem:Volatile LD4[FixedStack0] GPR:%71
	dead %72:gpr = SUBrr %70, %71, pred:14, pred:%noreg, opt:def %cpsr; GPR:%72,%70,%71
	Bcc %bb.23, pred:1, pred:killed %cpsr
	B %bb.24
    Successors according to CFG: %bb.24(0x7ffff800 / 0x80000000 = 100.00%) %bb.23(0x00000800 / 0x80000000 = 0.00%)

%bb.23: derived from LLVM BB %if.end52
    Predecessors according to CFG: %bb.22 %bb.27
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp
	BL $__stack_chk_fail, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit-def %sp
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp

%bb.24: derived from LLVM BB %if.end52
    Predecessors according to CFG: %bb.22
	%65:gpr = ADDrsi %16, %16, 10, pred:14, pred:%noreg, opt:%noreg; GPR:%65,%16,%16
	%66:gpr = LDRLIT_ga_pcrel @_message_columns; GPR:%66
	%67:gpr = ADDrsi %66, %65, 18, pred:14, pred:%noreg, opt:%noreg; GPR:%67,%66,%65
	%68:tcgpr = LDRi12 %67, 8, pred:14, pred:%noreg; mem:LD4[%callback](tbaa=!829) tcGPR:%68 GPR:%67
	TCRETURNri %68, implicit %sp, implicit %r0, implicit killed %r1; tcGPR:%68 dbg:message.c:353:10

%bb.25: derived from LLVM BB %for.inc56
    Predecessors according to CFG: %bb.19
	DBG_VALUE 1, debug-use %noreg, !"i", !DIExpression(); line no:313
	DBG_VALUE 1, debug-use %noreg, !"i", !DIExpression(); line no:313
	%51:gpr = LDRLIT_ga_pcrel @.str.10; GPR:%51 dbg:message.c:347:6
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%r0 = COPY %51; GPR:%51 dbg:message.c:347:6
	%r1 = COPY %19; GPR:%19 dbg:message.c:347:6
	BL @strcmp, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:347:6
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%52:gpr = COPY %r0; GPR:%52 dbg:message.c:347:6
	CMPri %52, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%52 dbg:message.c:347:6
	Bcc %bb.29, pred:1, pred:killed %cpsr; dbg:message.c:347:6
    Successors according to CFG: %bb.26(0x30000000 / 0x80000000 = 37.50%) %bb.29(0x50000000 / 0x80000000 = 62.50%)

%bb.26: 
    Predecessors according to CFG: %bb.25
	%50:gpr = MOVi 1, pred:14, pred:%noreg, opt:%noreg; GPR:%50
	%82:gpr = COPY %50; GPR:%82,%50
	B %bb.22
    Successors according to CFG: %bb.22(?%)

%bb.27: derived from LLVM BB %cleanup
    Predecessors according to CFG: %bb.5 %bb.11 %bb.32 %bb.21 %bb.17 %bb.36 %bb.37
	%17:gpr = COPY %83; GPR:%17,%83
	%74:gpr = LDRi12 %22, 0, pred:14, pred:%noreg; mem:Volatile LD4[@__stack_chk_guard] GPR:%74,%22
	%75:gpr = LDRi12 %stack.0.StackGuardSlot, 0, pred:14, pred:%noreg; mem:Volatile LD4[FixedStack0] GPR:%75
	dead %76:gpr = SUBrr %74, %75, pred:14, pred:%noreg, opt:def %cpsr; GPR:%76,%74,%75
	Bcc %bb.23, pred:1, pred:killed %cpsr
	B %bb.28
    Successors according to CFG: %bb.28(0x7ffff800 / 0x80000000 = 100.00%) %bb.23(0x00000800 / 0x80000000 = 0.00%)

%bb.28: derived from LLVM BB %cleanup
    Predecessors according to CFG: %bb.27
	%r0 = COPY %17; GPR:%17 dbg:message.c:356:1
	BX_RET pred:14, pred:%noreg, implicit killed %r0; dbg:message.c:356:1

%bb.29: derived from LLVM BB %for.inc56.1
    Predecessors according to CFG: %bb.25
	DBG_VALUE 2, debug-use %noreg, !"i", !DIExpression(); line no:313
	DBG_VALUE 2, debug-use %noreg, !"i", !DIExpression(); line no:313
	%54:gpr = LDRLIT_ga_pcrel @.str.4; GPR:%54 dbg:message.c:347:6
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%r0 = COPY %54; GPR:%54 dbg:message.c:347:6
	%r1 = COPY %19; GPR:%19 dbg:message.c:347:6
	BL @strcmp, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:347:6
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%55:gpr = COPY %r0; GPR:%55 dbg:message.c:347:6
	CMPri %55, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%55 dbg:message.c:347:6
	Bcc %bb.31, pred:1, pred:killed %cpsr; dbg:message.c:347:6
    Successors according to CFG: %bb.30(0x30000000 / 0x80000000 = 37.50%) %bb.31(0x50000000 / 0x80000000 = 62.50%)

%bb.30: 
    Predecessors according to CFG: %bb.29
	%53:gpr = MOVi 2, pred:14, pred:%noreg, opt:%noreg; GPR:%53
	%82:gpr = COPY %53; GPR:%82,%53
	B %bb.22
    Successors according to CFG: %bb.22(?%)

%bb.31: derived from LLVM BB %for.inc56.2
    Predecessors according to CFG: %bb.29
	DBG_VALUE 3, debug-use %noreg, !"i", !DIExpression(); line no:313
	DBG_VALUE 3, debug-use %noreg, !"i", !DIExpression(); line no:313
	%56:gpr = LDRLIT_ga_pcrel @.str.11; GPR:%56 dbg:message.c:347:6
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%r0 = COPY %56; GPR:%56 dbg:message.c:347:6
	%r1 = COPY %19; GPR:%19 dbg:message.c:347:6
	BL @strcmp, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:347:6
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%57:gpr = COPY %r0; GPR:%57 dbg:message.c:347:6
	CMPri %57, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%57 dbg:message.c:347:6
	Bcc %bb.21, pred:0, pred:killed %cpsr; dbg:message.c:347:6
	B %bb.32; dbg:message.c:347:6
    Successors according to CFG: %bb.21(0x30000000 / 0x80000000 = 37.50%) %bb.32(0x50000000 / 0x80000000 = 62.50%)

%bb.32: derived from LLVM BB %for.inc56.3
    Predecessors according to CFG: %bb.31
	DBG_VALUE 4, debug-use %noreg, !"i", !DIExpression(); line no:313
	DBG_VALUE 4, debug-use %noreg, !"i", !DIExpression(); line no:313
	%60:gpr = LDRLIT_ga_pcrel @.str.12; GPR:%60 dbg:message.c:347:6
	ADJCALLSTACKDOWN 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%r0 = COPY %60; GPR:%60 dbg:message.c:347:6
	%r1 = COPY %19; GPR:%19 dbg:message.c:347:6
	BL @strcmp, <regmask %lr %d8 %d9 %d10 %d11 %d12 %d13 %d14 %d15 %q4 %q5 %q6 %q7 %r4 %r5 %r6 %r7 %r8 %r9 %r10 %r11 %s16 %s17 %s18 %s19 %s20 %s21 %s22 %s23 %s24 %s25 %s26 %s27 and 35 more...>, implicit-def dead %lr, implicit %sp, implicit %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0; dbg:message.c:347:6
	ADJCALLSTACKUP 0, 0, pred:14, pred:%noreg, implicit-def dead %sp, implicit %sp; dbg:message.c:347:6
	%61:gpr = COPY %r0; GPR:%61 dbg:message.c:347:6
	%59:gpr = MOVi 0, pred:14, pred:%noreg, opt:%noreg; GPR:%59
	CMPri %61, 0, pred:14, pred:%noreg, implicit-def %cpsr; GPR:%61 dbg:message.c:347:6
	%83:gpr = COPY %59; GPR:%83,%59
	Bcc %bb.27, pred:1, pred:killed %cpsr; dbg:message.c:347:6
    Successors according to CFG: %bb.33(0x30000000 / 0x80000000 = 37.50%) %bb.27(0x50000000 / 0x80000000 = 62.50%)

%bb.33: 
    Predecessors according to CFG: %bb.32
	%58:gpr = MOVi 4, pred:14, pred:%noreg, opt:%noreg; GPR:%58
	%82:gpr = COPY %58; GPR:%82,%58
	B %bb.22
    Successors according to CFG: %bb.22(?%)

# End machine code for function message_set_header_value.

*** Bad machine code: Using an undefined physical register ***
- function:    message_set_header_value
- basic block: %bb.24 if.end52 (0xf53bf9e0)
- instruction: TCRETURNri
- operand 2:   implicit %r0

*** Bad machine code: Using an undefined physical register ***
- function:    message_set_header_value
- basic block: %bb.24 if.end52 (0xf53bf9e0)
- instruction: TCRETURNri
- operand 3:   implicit killed %r1
fatal error: error in backend: Found 2 machine code errors.
cc: error: clang frontend command failed with exit code 70 (use -v to see invocation)
FreeBSD clang version 6.0.0 (branches/release_60 321788) (based on LLVM 6.0.0)
Target: armv6-unknown-freebsd12.0-gnueabihf
Thread model: posix
InstalledDir: /usr/bin

http://beefy8.nyi.freebsd.org/data/head-armv6-default/p459021_s327977/logs/deforaos-mailer-0.1.7.log
Comment 1 Jan Beich freebsd_committer 2018-01-17 19:16:31 UTC
Created attachment 189857 [details]
command line args (for clang 6.0)
Comment 2 Jan Beich freebsd_committer 2018-01-17 20:18:21 UTC
Doh, I didn't notice Clang 5.0 was also crashing:
http://beefy8.nyi.freebsd.org/data/head-armv6-default/p458501_s327711/logs/errors/deforaos-mailer-0.1.7.log
Comment 4 Dimitry Andric freebsd_committer 2018-01-21 20:34:14 UTC
Bisecting shows this to have been introduced with https://reviews.llvm.org/rL203575 ("ARM: enable tail call optimisation on Thumb 2").  Since that is a very old commit, we seem to be hitting an edge case.

I'll submit a PR upstream, but I would not get my hopes up :)
Comment 5 Dimitry Andric freebsd_committer 2018-01-21 20:43:13 UTC
Submitted https://bugs.llvm.org/show_bug.cgi?id=36031.

Note that tuning down the -fstack-protector setting from 3 (which means 'all') to 2 (e.g. 'strong') makes the crash go away.  So maybe this can be used as a workaround.