db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4124) Broken double-checked-locking in EmbeddedDataSource.findDriver
Date Fri, 27 Mar 2009 14:14:50 GMT

    [ 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:
>         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.

View raw message