1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-24 10:42:31 +03:00

codership/wsrep-lib#117 Fixed empty vector access.

Access to empty vector by using operator[] may cause stdlib++
assertions to fail. Replaced the vector data access to use data()
method which is valid operation even if the vector is empty.

Added unit test to reproduce assertion with empty mutable_buffer access.

Added -D_GLIBCXX_ASSERTIONS preprocessor option to debug builds
to catch standard library misuse.

Added gcc 8 and gcc9 into travis build matrix.
This commit is contained in:
Teemu Ollakka
2019-12-05 13:29:42 +02:00
parent c9513bd2e4
commit 9b25cebdf1
6 changed files with 111 additions and 3 deletions

View File

@ -884,7 +884,7 @@ wsrep::wsrep_provider_v26::enter_toi(
return map_return_value(wsrep_->to_execute_start(
wsrep_,
client_id.get(),
&wsrep_keys[0],
wsrep_keys.data(),
wsrep_keys.size(),
&wsrep_buf,
1,