mariadb/storage
Andrew Hutchings 59c9e2f202
MDEV-29579 Fix CONNECT ASAN hits (#2277)
There are currently two things causing ASAN hits on CONNECT engine when
the plugin is used as a dynamic module. These are libxml2 and libodbc.

libxml2 has some quirks when not the first and last thing called in the
main thread of an application, some of the global memory isn't cleaned
up correctly. The same is assumed of libodbc but this does not have
explicit API for this.

This is being fixed in two ways.

First we are removing the libxml2 cleanup call. This is because the
current one is messy and whatever it fixed has gone away. But also
because if this is called and libxml2 is used again this can cause
issues. For example if two different plugins to MariaDB both happen to
use libxml2.

The second fix is a hack that exploits `STB_GNU_UNIQUE` so that when
compiled with ASAN the plugin will remain in memory after dlclose().
This allows libodbc to cleanup and has the added advatage that we will
get clean stacks from ASAN for CONNECT when the leak is detected at the
end of execution.

Details of the `STB_GNU_UNIQUE` method can be found here:

https://web.archive.org/web/20100730094324/http://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
2022-09-26 13:59:23 +01:00
..
archive MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-27 00:50:55 +10:00
blackhole Merge branch '10.2' into 10.3 2020-10-30 17:23:53 +01:00
cassandra Merge 10.2 into 10.3 2021-11-29 10:33:06 +02:00
connect MDEV-29579 Fix CONNECT ASAN hits (#2277) 2022-09-26 13:59:23 +01:00
csv MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-27 00:50:55 +10:00
example MDEV-27730 Add PLUGIN_VAR_DEPRECATED flag to plugin variables 2022-02-18 13:10:20 +09:00
federated MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-27 00:50:55 +10:00
federatedx Merge 10.2 into 10.3 2022-04-06 08:06:35 +03:00
heap Fix clang -Wunused-but-set-variable in unit tests 2022-07-26 08:18:36 +03:00
innobase MDEV-29600 Memory leak in row_log_table_apply_update() 2022-09-22 11:18:00 +03:00
maria Fix clang -Wunused-but-set-variable in unit tests 2022-07-26 08:18:36 +03:00
mroonga MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
myisam Fix clang -Wunused-but-set-variable 2022-09-19 13:30:52 +03:00
myisammrg Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
oqgraph Merge 10.2 into 10.3 2021-11-29 10:33:06 +02:00
perfschema Merge 10.2 into 10.3 2022-03-29 09:53:15 +03:00
rocksdb A cleanup for MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-13 12:44:23 +04:00
sequence MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
sphinx MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-27 00:50:55 +10:00
spider Backport fix for MDEV-29352 to 10.3-10.5 2022-09-21 22:02:21 +09:00
test_sql_discovery MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
tokudb MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00