Commit graph

12 commits

Author SHA1 Message Date
Tor Didriksen
966e1a42d9 Bug#16945503 ADDRESSSANITIZER BUG IN SYS_VARS
Sys_var_keycache inherits from some variant of Sys_var_integer

Instances of Sys_var_keycache are initialized using the KEYCACHE_VAR macro,
which takes an offset within st_key_cache.
However, the Sys_var_integer CTOR treats the offset as if it was within
global_system_variables (hidden within some layers of macros and fuction
pointers)

The result is that we write arbitrary data to arbitrary locations in memory.
This all happens during static initialization of global objects,
i.e. before we have even entered the main() function.


Bug#12325449 TYPO IN CMAKE/DTRACE.CMAKE
Fix typo in dtrace.cmake
2013-06-21 14:18:01 +02:00
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Vladislav Vaintroub
3afaada70d Post-fix for Bug#58158 on Solaris
Problem : The build might fail with 
make[2]: *** No rule to make target `../sql/z',
needed by `sql/mysqld_dtrace_all.o'.  Stop.
if one of plugins would depends on system libz 
library

Fix: Filter out non-static dependent libraries
when dtracing static libs
2010-11-25 00:20:36 +00:00
Mats Kindahl
788d3c4518 Bug #55966: "plugin" tests fail in 5.5
On Solaris with version 3.4.6, the ha_example.so shared library is built
with DTrace and the server is built without DTrace support. This occurs
because dtrace.cmake disables DTrace support for 3.4.6, but still set
HAVE_DTRACE, which causes probes_mysql.h to include probes_mysql_dtrace.h
instead of probes_mysql_nodtrace.h.

This patch fixes this by not setting HAVE_DTRACE on Solaris for GCC 3.4.6.
2010-09-06 14:45:12 +02:00
Vladislav Vaintroub
462500edfd Workaround crash with dtraced shared libraries under GCC 3.4.6 on 32 bit Solaris.
Crash happens in dlopen() code when trying to load the library. Crash does not happen when library is 
not DTrace instrumented . Additionally, crash does not happen with default Solaris 10 GCC 3.4.3 and
it does not happen if main executable is instrumented.

So , just check for this specific situation (32 bit, GCC3.4.6 , Solaris) and disable Dtrace in shared libraries.
We have only single plugin so far that is instrumented (ha_example)
2010-02-25 17:31:31 +01:00
Vladislav Vaintroub
f8d896fca5 use systemtap on linux if installed, for dtrace functionality 2009-12-24 07:21:05 +01:00
Vladislav Vaintroub
826ecdb852 Dtrace on Solaris:
fix excessive relinking that results from rerunning
dtrace -G second time on the objects that come into 
static library. 
The reason for relinking is that dtrace -G changes 
timestamp for the object file, which in turn results
in re-archiving the mysys on next time make runs, 
which causes relinking of the whole mysql, because
everything depends on mysys.

The fix is to copy objects into temp before running 
dtrace -G in mysqld pre-build step. This way dtrace 
does not affect the object timestamp.
2009-12-13 05:42:26 +00:00
Vladislav Vaintroub
670fb75598 Introduce macro DTRACE_INSTRUMENT_STATIC_LIBS,to hide
the ugly Solaris dtrace workarounds
2009-12-11 18:33:00 +00:00
Vladislav Vaintroub
6454d6e2c6 Introduce a workaround for Solaris' inability to deal with dtrace in static libraries.
Rerun dtrace -G on all  objects that can contan dtrace probes (also objects that are
part of static libs) before linking mysqld to produce dtrace_probes_all.o and link 
dtrace_probes_all.o with mysqld

This ugly workaround was inspired by handling dtrace using autotools.
2009-12-11 15:51:39 +01:00
Vladislav Vaintroub
f7269ba0c7 fix build errors 2009-12-01 18:28:13 +00:00
Vladislav Vaintroub
12c7945b5b correctly specify working directory for dtrace_prelink. Also, generate _dtrace.o in the object directory 2009-11-11 12:51:44 +00:00
Vladislav Vaintroub
13cd7170cc WL#5161 : Cross-platform build with CMake 2009-11-09 12:32:48 +01:00