[Rpm-maint] [rpm-software-management/rpm] Fix data race in packageBinaries() function (#1264)
Tom Stellard
notifications at github.com
Mon Jun 15 15:22:25 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 single
> for (int i = 0; i < npkgs; i++) {
> - pkg = tasks[i];
> + Package pkg = tasks[i];
I just checked and doing this also fixes the bug.
> #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-644201067
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200615/6c2d3a64/attachment.html>
More information about the Rpm-maint
mailing list