mariadb/libmysql
gkodinov/kgeorge@magare.gmz f45601ce58 Bug #27383: Crash in test "mysql_client_test"
The C optimizer may decide that data access operations
through pointer of different type are not related to 
the original data (strict aliasing).
This is what happens in fetch_long_with_conversion(),
when called as part of mysql_stmt_fetch() : it tries 
to check for truncation errors by first storing float
(and other types of data) into a char * buffer and then 
accesses them through a float pointer.
This is done to prevent the effects of excess precision
when using FPU registers.
However the doublestore() macro converts a double pointer
to an union pointer. This violates the strict aliasing rule.
Fixed by making the intermediary variables volatile (
to not re-introduce the excess precision bug) and using
the intermediary value instead of the char * buffer.
Note that there can be loss of precision for both signed
and unsigned 64 bit integers converted to double and back,
so the check must stay there (even for compatibility 
reasons).
Based on the excellent analysis in bug 28400.
2007-06-22 15:34:28 +03:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
acinclude.m4 Import changeset 2000-07-31 21:29:14 +02:00
client_settings.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
CMakeLists.txt bug#28358 libmysql.dll cannot be dynamically loaded on Windows 2007-05-14 13:20:18 +02:00
conf_to_src.c manually merged 2004-08-18 19:57:55 +02:00
dll.c manually merged 2004-08-18 19:57:55 +02:00
errmsg.c Added some missing DBUG_RETURN 2006-11-23 16:41:21 +02:00
get_password.c - rename: EXCEPTIONS->EXCEPTIONS-CLIENT 2004-08-05 17:05:11 +02:00
libmysql.c Bug #27383: Crash in test "mysql_client_test" 2007-06-22 15:34:28 +03:00
libmysql.def Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
libmysql.ver.in BUG#3074: Unversioned symbols in shared library 2006-01-17 18:51:08 +04:00
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
Makefile.shared ha_innodb.m4, Makefile.am, ha_ndbcluster.m4, Makefile.shared, ha_berkeley.m4: 2006-11-27 21:15:25 +01:00
manager.c A fix (bug #6057: Data Type Problem in manager.c). 2004-10-18 12:43:52 +05:00
mytest.c make dist changes for Cmake build 2006-09-01 10:32:12 +02:00