Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-33616 Tests failing on macOS #3206

Open
wants to merge 1 commit into
base: 11.4
Choose a base branch
from

Conversation

DaveGosselin-MariaDB
Copy link
Member

These tests rely on THR_KEY_mysys but it is not initialized. On Linux, the corresponding thread variable is null, but on macOS it has a nonzero value. In all cases, initialize the variable explicitly. We could call MY_INIT, however some memory is leaked on test program exit in that case. Instead, factor just enough to be able to initialize THR_KEY_mysys from the test code (as well as from the library code).

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vuvova
Copy link
Member

vuvova commented Apr 15, 2024

We could call MY_INIT, however some memory is leaked on test program exit in that case

did you pair it with my_end() at the end?

@DaveGosselin-MariaDB
Copy link
Member Author

We could call MY_INIT, however some memory is leaked on test program exit in that case

did you pair it with my_end() at the end?

I saw the MY_INIT macro standing alone and didn't know about my_end(). I tried that and it works, so I'll deliver that instead of the factoring-based approach.

These tests rely on THR_KEY_mysys but it is not initialized.  On
Linux, the corresponding thread variable is null, but on macOS it has a
nonzero value.  In all cases, initialize the variable explicitly.  We could
call MY_INIT, however some memory is leaked on test program exit in that
case.  Instead, factor just enough to be able to initialize THR_KEY_mysys
from the test code (as well as from the library code).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants