Bugs item #3539648, was opened at 2012-07-03 01:53
Message generated for change (Tracker Item Submitted) made by ecourreges
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379806&aid=3539648&group_id=23824

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Emmanuel Courrges (ecourreges)
Assigned to: Nobody/Anonymous (nobody)
Summary: dbi_conn_error not reentrant

Initial Comment:
Just thought I would finally file this one which could be fixed for the next 
release:

The static errmsg in dbi_conn_error prevents the function from being used in a 
multithreaded context.
It clearly crashes when 2 or more threads (each having their own dbi_conn) try 
to get the error message simultaneously.

I guess the simplest solution is to allocate it and force the user to free it, 
but all existing code will have a memory leak...
Another good solution is to add a char * full_err_msg in the dbi_conn_t, so 
that it becomes thread safe for different connections, and it avoids the memory 
leak or an api change.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379806&aid=3539648&group_id=23824

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libdbi-devel mailing list
libdbi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to