Internal unhandled exception - access violation -> crash
🤖 Trunk
FPCprogram test;
{$modeswitch implicitfunctionspecialization}
generic procedure FillChar<T>(var x; count: SizeInt; value: Byte);
begin
end;
var v: array [0..0] of Byte;
begin
FillChar(v, 0, 0);
end.
Compile:
C:\fpclaztrunk\fpc\bin\x86_64-win64\fpc.exe -n -FuC:\fpclaztrunk\fpc\units\x86_64-win64\rtl -O3 -gl test.pas
Output:
test.pas(10,1) Error: Compilation raised exception internally
Fatal: Compilation aborted
An unhandled exception occurred at $0000000100002D4D:
EAccessViolation: Access violation
$0000000100002D4D fpc_shortstr_to_shortstr, line 812 of ../inc/generic.inc
$0000000100063F3F GETREALNAME, line 204 of symbase.pas
$0000000100080948 TYPENAME, line 412 of symtype.pas
$00000001002410C0 BEFOREAPPENDDEF, line 1824 of dbgdwarf.pas
$000000010005A6A6 APPENDDEF, line 243 of dbgbase.pas
$000000010005AE23 WRITE_SYMTABLE_DEFS, line 490 of dbgbase.pas
$0000000100245E8F INSERTTYPEINFO, line 3343 of dbgdwarf.pas
$000000010020117B PROC_PROGRAM_AFTER_PARSING, line 2431 of pmodules.pas
$0000000100201AF6 PROC_PROGRAM_DECLARATIONS, line 2711 of pmodules.pas
$000000010020230D PROC_PROGRAM, line 2960 of pmodules.pas
$0000000100043925 COMPILE_MODULE, line 488 of parser.pas
$0000000100062268 CONTINUE, line 269 of ctask.pas
$0000000100062406 PROCESSQUEUE, line 334 of ctask.pas
$000000010001B0AC COMPILE, line 311 of compiler.pas
$0000000100001ABD main, line 308 of pp.pas
$00000001000027A6 MAIN_WRAPPER
$0000000100013B80 EXE_ENTRY, line 83 of x86_64/cpuwin.inc