I haven't looked in depth into it. But I saw that there is "const param optimization".
Which hopefully is done correctly? If done with strings (dyn-array, or other managed types) then this can lead to crashes. That has been explained various times, here on the forum.
procedure foo(const data: string);
even if there is no write access to the variable "data", if there is
var text: string;
begin
foo(text);
And in any way (nested calls, callback, events, pointers, whatever) "text" is write accessed (while in foo, or in anything called nested by foo) => then this can crash.
Note: "can" => "may" or "has the potential to sometimes".
In most simple cases and test, it will not show any problem. But when you have more real code than a demo, then it can.
Even the IDE itself had that issue at least once, and it had crashed for some people because of it.