mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
Lua doesn't have separate integer and floating point numbers, so we check if a number can fit in an integer and if so convert it to an integer. The conversion routine invokes undefined behavior (and even acknowledges it!). More recent compilers changed their behavior when casting infinities, breaking test_user_function_double_return which tests this conversion. Fix by tightening the conversion to not invoke undefined behavior. Closes scylladb/scylladb#28503