You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Kamil Włodarczyk (JIRA)" <ji...@apache.org> on 2015/11/22 19:39:11 UTC

[jira] [Created] (MATH-1294) Data race PolynomialUtils::buildPolynomial

Kamil Włodarczyk created MATH-1294:
--------------------------------------

             Summary: Data race PolynomialUtils::buildPolynomial
                 Key: MATH-1294
                 URL: https://issues.apache.org/jira/browse/MATH-1294
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 4.0
            Reporter: Kamil Włodarczyk
            Priority: Minor


If you run PolynomialUtilsTest methods concurrently there will occur problem with ComparisonFailure due to incorrect building of coefficient list. https://github.com/apache/commons-math/blob/master/src/main/java/org/apache/commons/math4/analysis/polynomials/PolynomialsUtils.java#L368 should be in synchronized block. Explanation: polynomial of given degree can be created by other thread  and when primary thread access synchronized block, there is already created coefficients for this degree, therefore no coefficients should be added to coefficients list.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)