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

Git Cleanup, Fix for #1486 #1495

Merged
merged 4 commits into from
Oct 11, 2019
Merged

Git Cleanup, Fix for #1486 #1495

merged 4 commits into from
Oct 11, 2019

Conversation

WardF
Copy link
Member

@WardF WardF commented Oct 10, 2019

Some misc. cleanup, and a bug fix that found its way into this branch.

@WardF WardF added this to the 4.7.2 milestone Oct 10, 2019
@WardF WardF self-assigned this Oct 10, 2019
@WardF WardF merged commit 2f18d4e into master Oct 11, 2019
@WardF WardF deleted the git_cleanup.wif branch October 11, 2019 21:42
@dopplershift
Copy link
Member

The bus error was caused by const???

@WardF
Copy link
Member Author

WardF commented Oct 17, 2019

I suspect that the compiler was protecting the memory, thus when we tried to manipulate the memory through pointer ‘magic’, we saw the bus error: 10 error. I couldn’t find anything saying what we were doing was undefined or illegal, but it would make sense given the observed behavior. It also appears to be platform specific, although disabling SIP on OSX had no effect.

@niziak
Copy link

niziak commented Nov 28, 2022

Hi. I hit SEGFAULT on Linux using v4.7.1 so I find issue where code is trying to modify read only (protected) memory. I saw also multiple commits changing problematic code.

  • First commit 6934aa2 introduced protections for variables adding const keyword. Which is good I think.
  • Then where const protection start working instead of fixing cause - protection was was removed because it became "problematic": d001ec8
  • And last 91d3a89 adds direct writing a values to variables.

Why the initialisation in loop is needed when there is a compile-time default value assigned (e.g. = {0};) ?
This change should be enough: 253d8fb

@niziak niziak mentioned this pull request Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

netcdf-4.7.1 creates Bus Error when testing ncgen3
3 participants