Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44276 invoked from network); 27 Mar 2009 14:15:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Mar 2009 14:15:22 -0000 Received: (qmail 68512 invoked by uid 500); 27 Mar 2009 14:15:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 68468 invoked by uid 500); 27 Mar 2009 14:15:21 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 68460 invoked by uid 99); 27 Mar 2009 14:15:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2009 14:15:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2009 14:15:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C5663234C003 for ; Fri, 27 Mar 2009 07:14:50 -0700 (PDT) Message-ID: <6898414.1238163290800.JavaMail.jira@brutus> Date: Fri, 27 Mar 2009 07:14:50 -0700 (PDT) From: "Myrna van Lunteren (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4124) Broken double-checked-locking in EmbeddedDataSource.findDriver In-Reply-To: <1708404682.1238139530558.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689905#action_12689905 ] Myrna van Lunteren commented on DERBY-4124: ------------------------------------------- This is an interesting observation...but I want to put in 1 cautionary comment; the stated webpage has no licensing/copyrighting info, but it's not clear to me whether the solution came from one of the mentioned articles or was found by one of the contributing/signing people. We can't use this fix if there's a copyright on it. > Broken double-checked-locking in EmbeddedDataSource.findDriver > -------------------------------------------------------------- > > Key: DERBY-4124 > URL: https://issues.apache.org/jira/browse/DERBY-4124 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.4.2.0 > Environment: all > Reporter: Ronald Tschalaer > > org.apache.derby.jdbc.EmbeddedDataSource.findDriver() uses the > double-checked-locking idiom for setting the 'driver' variable. This > idiom is, however, not correct and hence the code is broken. The fix > is to remove the outer if, i.e. to always enter the synchronized block. > See also > http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.