Additional notes on current Win64 build failures based on further investigation (before-and-after assembly listings attached)
Original Reporter info from Mantis: Akira1364
-
Reporter name:
Original Reporter info from Mantis: Akira1364
- Reporter name:
Description:
To recap, as it stands right now attempts to do a full build of the FPC source tree on Win64 (with a bootstrap compiler binary that is also 64-bit) will consistently fail at the "packages_all" stage specifically because the FPMake executable generated by the newly-built compiler crashes immediately upon trying to build the first package.
I've attached two assembly listings for "fpmkunit.pp" here: one from a working build by the last "good" revision of the compiler, and one from a broken build by the current trunk revision of the compiler.
Steps to reproduce:
Build trunk from a Win64 bootstrap binary.
Additional information:
From what I can tell, the most significant difference is that the broken version appears to (invalidly, I believe) call things like "fpc_ansistr_decr_ref" on the same address two times in a row instead of just once in a large number of places, behaviour that is not present in the working version.
For example, from the "bad" build:
.section .text.n_fpmkunit$_$iswild$ansistring$ansistring$boolean$$boolean_$$_fin$93,"x"
.balign 16,0x90
FPMKUNIT$_$ISWILD$ANSISTRING$ANSISTRING$BOOLEAN$$BOOLEAN_$$_fin$93:
.Lc6:
.seh_proc FPMKUNIT$_$ISWILD$ANSISTRING$ANSISTRING$BOOLEAN$$BOOLEAN_$$_fin$93
# [1527] begin
pushq %rbp
.seh_pushreg %rbp
.Lc8:
.Lc9:
movq %rcx,%rbp
.Lc10:
leaq -32(%rsp),%rsp
.seh_stackalloc 32
.seh_endprologue
# [1601] end;
leaq -8(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -16(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -112(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -104(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -96(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -64(%rbp),%rax
movq %rax,%rcx
call fpc_ansistr_decr_ref
leaq -8(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -16(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -112(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -104(%rbp),%rcx
call fpc_ansistr_decr_ref
leaq -96(%rbp),%rcx
call fpc_ansistr_decr_ref
nop
leaq 32(%rsp),%rsp
popq %rbp
ret
.seh_endproc
And from the "good" build:
.section .text.n_fpmkunit$_$iswild$ansistring$ansistring$boolean$$boolean_$$_fin$0,"x" .balign 16,0x90 FPMKUNIT$_$ISWILD$ANSISTRING$ANSISTRING$BOOLEAN$$BOOLEAN_$$_fin$0: .Lc6: .seh_proc FPMKUNIT$_$ISWILD$ANSISTRING$ANSISTRING$BOOLEAN$$BOOLEAN_$$_fin$0 # [1527] begin pushq %rbp .seh_pushreg %rbp .Lc8: .Lc9: movq %rcx,%rbp .Lc10: leaq -32(%rsp),%rsp .seh_stackalloc 32 .seh_endprologue # [1601] end; leaq -64(%rbp),%rax movq %rax,%rcx call fpc_ansistr_decr_ref leaq -112(%rbp),%rcx call fpc_ansistr_decr_ref leaq -104(%rbp),%rcx call fpc_ansistr_decr_ref leaq -96(%rbp),%rcx call fpc_ansistr_decr_ref leaq -8(%rbp),%rcx call fpc_ansistr_decr_ref leaq -16(%rbp),%rcx call fpc_ansistr_decr_ref nop leaq 32(%rsp),%rsp popq %rbp ret
.seh_endproc
Mantis conversion info:
- Mantis ID: 34574
- OS: Windows
- OS Build: 10
- Build: Approximately r40345 (and above)
- Platform: x86_64
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 40357 (#b96a8aee)