Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-10496 test_chebyMap.py sometimes segfaults #13

Merged
merged 2 commits into from May 10, 2017
Merged

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented May 10, 2017

No description provided.

Copy link

@parejkoj parejkoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but see comments for a couple tweaks.

lbnd_i = [-3.0]
ubnd_i = [-1.0]

for i in range(1000):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the for loop here is to ensure that you trigger the segfault? Please document it as such, otherwise it's confusing why there's an un-used iterator in a loop here.

Also, please lift the assert into the loop (might as well check each of the returns, incase the bug manifests itself as data corruption instead of a segfault).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes to both. Note: I originally had the assert in the loop, but found it greatly reduced the odds of a segfault, so I moved it out. However, I then found that creating amap in the loop greatly increased the odds of a segfault. It turns out that this remains so even with the assert in the loop, so I moved the assert back into the loop as you requested.

[-3.6, 2, 1],
])

for i in range(1000):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document why there's a big for loop here, and lift the assert into the loop (might as well check each of the returns, incase the bug manifests itself as data corruption instead of a segfault).

...one for PolyMap, one for ChebyMap.
@r-owen r-owen merged commit 23332b3 into master May 10, 2017
@ktlim ktlim deleted the tickets/DM-10496 branch August 25, 2018 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants