Hi folks,
I am the maintainer of NSS MySQL which is, as you may have guessed, a
nss module using MySQL as backend. It shares a mysql connection between
threads. As explained in the documentation, I use my_thread_init and
my_thread_end functions to properly manage that situation.
As you may know, a nss module provides UNIX user lookup functions such
as getgrnam. That means that basically any applications can call the nss
modules function even the ones which uses MySQL too. And there lies the
issue. Indeed, if the application follows this path :
- calls mysql_connect or mysql_thread_init
...
- calls a function like getgrnam
- does MySQL stuff
The application will segfault since the nss module has called
my_thread_end. I do not see any solutions to this because if I remove
calls to my_thread_end I create a memory leak. I've read the source of
my_thread_init, it seems that there is no way to know if the MySQL data
was already allocated (in this case, I would not call my_thread_end).
Could anyone help me out ?
TIA.
PS: Please keep me CC'ed as I am not subscribed.
--
Guillaume Morin [EMAIL PROTECTED]
I wish you were here
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php