[unixODBC-support] Memory being overwritten when using unixODBC
Micah N Gorrell
micah.gorrell at messagingarchitects.com
Wed Jul 20 21:13:32 BST 2005
I have been writing a driver for MDB that uses a database to emulate
a directory. MDB is a directory access library used by the hula
I have been developing the driver using unixODBC, and it has been
working very well for the most part. Lately I have been running into
a strange problem though. The first time the driver is used I create
the tables and indexes that are needed, and insert a few records with
the default information. Every time it is run after that the setup
portion is skipped.
When I run with a clean database it will successfully run all the
setup, and continue to run properly. When the program is complete
however it crashes by trying to access an address that has been
overwritten. If I run again, and the setup portion does not run,
then the memory does not get overwritten and there is no crash.
My first assumption was that this was caused by an overwrite in my
code, but I have not been able to find it. The unixODBC that I had
been using was a few revisions old, so I built from source, and the
problem went away. I then continued my development, and made changes
to the library in a completely unrelated area, and the problem has
I am going to continue looking for the overwrite in my code, but I
would like to know if there are any known bugs in unixODBC that would
cause memory to be overwritten?
I am very new to ODBC. Could I be doing something incorrectly that
is causing this? Any other suggestions for tracking this down?
More information about the unixODBC-support