Fix crash in MAP_End when using Intel's new icx compiler and disable caching in setup-python GH action #2173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is ready to be merged.
Feature or improvement description
This PR provides two fixes:
MAP_End
) caused by double freeing memory related to strings. This crash only occurred when using the new Intel icx compiler.setup-python
Github Action to disable caching of Python modules. This should fix the issue where regression tests fail becausesetup-python
can't findrequirements.txt
.Related issue, if one exists
PR #2129 was a previous attempt to fix the issue with
setup-python
and the regression tests which didn't succeed.Impacted areas of the software
Additional supporting information
The issue with MAP trying to free the memory twice looks like it has been around since the module was added. The problem stemmed from several nodes being added to the
OutputList
by directly copying the data. These nodes contained pointers to strings which were allocated. These pointers were shared with nodes in other lists which were freed earlier inMAP_End
. When theOutputList
nodes were freed, the code tried to free the same pointers again, resulting in a crash. The issue was resolved by creating new nodes inOutputList
with a copy of the data instead of reusing the existing pointers. The amount of data copied is very small so this was a simpler solution than trying to track the pointer usage.This fix will need to be migrated to the other branches once approved.