-
Notifications
You must be signed in to change notification settings - Fork 262
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
gdl testsuite fails with 4.4.1 - ../../libsrc/nc_hashmap.c:106: rehashVar: Assertion `count == hm->count' failed #282
Comments
Try the following:
The problem is that the name was being updated prior to the old variable being removed from the hashmap. It checks whether the key and the name of the variable being removed match, but since the name had already been updated, the names did not match so the variable was not removed. The patch above removes the variable from the hashmap first, then updates the name, and then adds the variable with the new name to the hashmap. Here is a c program that reproduces the gdi/idl code above and shows the same issue:
|
Note that we probably need the same restructure on the NC3_rename_dim code. Not sure why it didn't trip the assert also. |
|
Thanks for the bug report, @opoplawski and thanks for the C test and patches, @gsjaardema . I'm catching up on other things now post 4.4.1 release, but will be incorporating the test into our set of tests ASAP. I'll also look at adding gdl to our docker-based regression tests, along with things like the python interface and NCO. |
gdl tests pass with this patch. Thanks. |
The fix has been tested and merged. Thanks! |
Environment Information
configure
)C
code to recreate the issue?Summary of Issue
Since updating Fedora to netcdf 4.4.1 from 4.4.0, I'm seeing this test failure in gdl on 32-bit only:
This assertion appears to have been added as part of commit 1f9eb80
Steps to reproduce the behavior
gdl/idl code is:
Crash must happen somewhere between the last two prints. At the abort:
On entry to rehashVar():
Then hm->size gets set to 11 on line 92. table entries:
It looks like that one of the calls to NC_hashmapAddVar when copying over the elements doesn't update count in the new table. Not sure why.
The text was updated successfully, but these errors were encountered: