FIX: Race Condition on Heap Variable Causes Access Violation in Oracle ODBC Driver

Article translations Article translations
Article ID: 290907 - View products that this article applies to.
This article was previously published under Q290907
Expand all | Collapse all

SYMPTOMS

When the Microsoft ODBC driver for Oracle is being loaded for the first time and is still in the initialization routines, two threads attempting to use the driver at the same time can encounter a race condition that causes an access violation (AV) in the ODBC driver.

This problem can occur in the Microsoft Data Access Components (MDAC) 2.6 version of the Oracle ODBC driver (2.573.6526.0) and earlier.

CAUSE

During initialization, the Microsoft Oracle ODBC driver creates a heap for its own internal use. This heap is created during the driver's DLLMain() initialization routines, and a handle to the heap is saved in a global variable.

Just prior to the creation of the heap, the driver loads the Oracle network libraries, which are necessary for communicating with the Oracle server. These DLLs can occasionally take a considerable amount of time to load, which delays the initialization of the heap variable.

If an additional thread is also starting up at the same time, it may attempt to use the heap handle before the other thread has given it a valid address, and an AV will occur.

RESOLUTION

This bug has been fixed in the Oracle ODBC Driver included with MDAC version 2.6 SP1.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1.

MORE INFORMATION

This fix can be applied to MDAC 2.5 and MDAC 2.6.

Properties

Article ID: 290907 - Last Review: September 26, 2005 - Revision: 2.1
APPLIES TO
  • Microsoft Open Database Connectivity 2.5
  • Microsoft Open Database Connectivity 2.5
  • Microsoft Open Database Connectivity 2.5
  • Microsoft Open Database Connectivity 2.0
  • Microsoft Open Database Connectivity 2.5
  • Microsoft Open Database Connectivity 2.5
  • Microsoft Open Database Connectivity 2.5
  • Microsoft Open Database Connectivity 2.5
Keywords: 
kbhotfixserver kbqfe kbbug kbfix kbmdac260sp1fix kboracle kbqfe KB290907
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com