1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-03 05:41:09 +03:00
Files
mariadb/mysql-test/t/func_math.test
Alexander Barkov 328edf8560 MDEV-21977 main.func_math fails due to undefined behaviour
The problem happened in these line:

uval0= (ulonglong) (val0_negative ? -val0 : val0);
uval1= (ulonglong) (val1_negative ? -val1 : val1);

return check_integer_overflow(val0_negative ? -(longlong) res : res,
                              !val0_negative);

when unary minus was performed on -9223372036854775808.
This behavior is undefined in C/C++.
2020-03-20 15:24:06 +04:00

21 KiB