[Rpm-maint] [rpm-software-management/rpm] Fix data race in packageBinaries() function (#1264)

Panu Matilainen notifications at github.com
Mon Jun 15 08:58:20 UTC 2020


Okay, the problem is fairly obvious, pkg being declared way outside the parallel block.
But rather than sprinkling more OpenMP magic dust to solve it, can you verify that this (ie just declare the variable inside the parallel block) solves the problem?

```     #pragma omp parallel
     #pragma omp single
     for (int i = 0; i < npkgs; i++) {
-       pkg = tasks[i];
+       Package pkg = tasks[i];
        #pragma omp task untied priority(i)
        {
        pkg->rc = packageBinary(spec, pkg, cookie, cheating, &pkg->filename);

```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1264#issuecomment-643998971
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200615/f862f618/attachment.html>


More information about the Rpm-maint mailing list