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

Fixed access violation in a type-bound procedure of open_hashmap_type #707

Merged

Conversation

degawa
Copy link
Contributor

@degawa degawa commented Apr 25, 2023

Based on issue #704, I added a presence check for the optional argument exists in get_other_open_data to fix the access violation due to assignment to an optional variable that was not presented.

The tasks done are summarized as follows:

  • Fixed stdlib_hashmap_open.f90.
  • Built using gfortran 11.2 bundled with quickstart Fortran on Windows 10 with cmake 3.20.3.
  • Executed cmake --build build --target test to run the tests and confirmed all tests passed.
  • Executed examples below that were using the open_hashmap_type and confirmed those finished successfully.
    • example_hashmaps_entries.f90
    • example_hashmaps_loading.f90
    • example_hashmaps_rehash.f90
    • example_hashmaps_remove.f90
    • example_hashmaps_set_other_data.f90

closes #704

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

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

Thank you @degawa for this fix.

@jvdp1 jvdp1 merged commit b76075a into fortran-lang:master May 4, 2023
@degawa degawa deleted the fix-open_hashmap_type-access-violation branch May 7, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants