This is related to
Infinity should not escape from the engine
In only tested FB2.5, but maybe FB2.1 behaves the same.
In Windows, there's a __try/__catch block around UDF execution to trap several special conditions. Normally the answer from these conditions is engine shutdown.
I think that in case of overflow, we don't need to panic. We simply need to convert it to an exception about FP overflow.
But I wonder why the protection block used by the Windows build is not working: it should invoke ISC_exception_post() in isc_sync.cpp.
SQL> declare external function dPower
CON> double precision by descriptor, double precision by descriptor,
CON> double precision by descriptor
CON> returns parameter 3
CON> entry_point 'power' module_name 'fbudf';
SQL> select dpower(10e+110, 3) from rdb$database;