Because MariaDB does not accept a constant virtual column (other DBMS's do) I was obliged to write the noconst UDF as:
Now, creating the table t1, inserting one line to it and displaying it does work:
However, later on when stopping the server a crash occurs in the function:
See the attach udf_crash.log.
The same kind of crash occurs with different other UDF's.