MySQL++ memory corruption, valgrind
Drew Vogel <[email protected]> Wed, 14 Dec 2005 20:42:51 -0600
| Newsgroups | gmane.comp.lib.state-threads.user |
|---|---|
| Message-ID | <[email protected]> |
I'm writing a multiplayer game server that uses MySQL as a backing store. I'm using the MySQL++ C++ wrapper for the standard mysql library. I am experiencing some memory corruption issues. The corruption appears after st_init() and after I setup a listening socket with the st_netfd_t functions. It happens before any new threads are created (when I say threads, I always mean state threads, I'm not using any pre-emptive threads). When I disable the state threads code, the MySQL++ code does not exhibit any memory corruption. The memory corruption also disappears when I run the code with Valgrind, with the state threads code active. The way in which the memory is corrupted is static, so the chance of bad RAM is extremely low. The MySQL++ library that I am linking against is not "thread-safe." I was under the impression that since there is no pre-emption, just yielding, I did not need to link against a thread-safe library. Do I? I searched the archives for this list for issues regarding Valgrind, MySQL++, and memory corruption in general. Is there anything I need to know about MySQL++ or Valgrind? When you reply, please CC me, as I am not subscribed to this list. Drew Vogel ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click