mariadb/storage/innobase/fts
Marko Mäkelä f3160ee44f MDEV-22782 AddressSanitizer race condition in trx_free()
In trx_free() we used to declare the entire trx_t unaccessible
and then declare that some data members are accessible.
This involves a race condition with other threads that may concurrently
access the data members that must remain accessible.
One type of error is "AddressSanitizer: unknown-crash", whose
exact cause we have not determined.

Another type of error (reported in MDEV-23472) is "use-after-poison",
where the reported shadow bytes would in fact be 00, indicating that
the memory was no longer poisoned. The poison-access-unpoison race
condition was confirmed by "rr replay".

We eliminate the race condition by invoking MEM_NOACCESS on each
individual data member of trx_t before freeing the memory to the pool.
The memory would not be unpoisoned until the pool is freed
or the memory is being reused for another allocation.

trx_t::free(): Replaces trx_free().

trx_t::active_commit_ordered: Changed to bool, so that MEM_NOACCESS
can be invoked. Removed some accessor functions.

Pool: Remove all MEM_ instrumentation.

TrxFactory: Move the MEM_ instrumentation from Pool.

TrxFactory::debug(): Removed. Moved to trx_t::free(). Because
the memory was already marked unaccessible in trx_t::free(), the
Factory::debug() call in Pool::putl() would be unable to access it.

trx_allocate_for_background(): Replaces trx_create_low().

trx_t::free(): Perform all consistency checks while avoiding
duplication, and declare most data members unaccessible.
2020-08-21 18:23:28 +03:00
..
fts0ast.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0blex.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0blex.l Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0config.cc MDEV-22721 Remove bloat caused by InnoDB logger class 2020-06-04 10:24:10 +03:00
fts0fts.cc MDEV-22782 AddressSanitizer race condition in trx_free() 2020-08-21 18:23:28 +03:00
fts0opt.cc MDEV-22769 Shutdown hang or crash due to XA breaking locks 2020-06-05 15:22:46 +03:00
fts0pars.cc Merge 10.1 into 10.2 2018-08-02 08:19:57 +03:00
fts0pars.y Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0plugin.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0que.cc Fix GCC 10.2.0 -Og -Wmaybe-uninitialized 2020-08-11 15:58:16 +03:00
fts0sql.cc Merge 10.1 into 10.2 2019-09-18 16:24:48 +03:00
fts0tlex.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0tlex.l Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
make_parser.sh Update FSF address 2019-05-11 19:25:02 +03:00
Makefile.query Merge 10.1 into 10.2 2019-04-02 09:14:15 +03:00