A test in Jaybird creates a table with a DECIMAL(18) field and inserts the maximum and minimum values into this table (and retrieves this).
The minimum value for a BIGINT / DECIMAL(18) should be -2^63 (or 0x8000000000000000 or -9223372036854775808), but when inserting this Firebird 3 throws error 335544779. Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.
Add 1 to the value and it works, so it looks like it is a boundary issue (it seems to use -1 * maximum value (2^63 - 1) as the boundary). The problem also occurs with a BIGINT.
This works correctly in Firebird 2.5 and in Firebird 3 Alpha 1 (build 305666)