The GitHub Actions job "CodeQL" on commons-math.git/gauss-jacobi-cache-race has 
failed.
Run started by GitHub user insaf021 (triggered by insaf021).

Head commit for run:
9b68d72994ad7f6de146313a6b46c77acf25150b / Mahammad Insaf <[email protected]>
fix racy cache lookups in BaseRuleFactory and PolynomialsUtils

BaseRuleFactory.getRule read and updated the pointsAndWeightsDouble
TreeMap without holding the lock used by getRuleInternal. Factory
instances are shared (IterativeLegendreGaussIntegrator keeps a static
GaussIntegratorFactory), so concurrent requests for different rules
could corrupt the map and leave callers spinning in TreeMap.getEntry.

PolynomialsUtils.createJacobiPolynomial published the coefficient list
for a new (v, w) key before seeding it and then read it outside the
lock guarding the seeding, so a racing caller could extend a partial
list and return a wrong polynomial. buildPolynomial also read the
cached coefficients after releasing the list lock.

Report URL: https://github.com/apache/commons-math/actions/runs/40464267551

With regards,
GitHub Actions via GitBox

Reply via email to