Skip to content

fix bounds check in get_diag_buffer#1160

Merged
thomas-robinson merged 1 commit into
NOAA-GFDL:dmUpdatefrom
rem1776:get_buff_fix
Apr 6, 2023
Merged

fix bounds check in get_diag_buffer#1160
thomas-robinson merged 1 commit into
NOAA-GFDL:dmUpdatefrom
rem1776:get_buff_fix

Conversation

@rem1776
Copy link
Copy Markdown
Contributor

@rem1776 rem1776 commented Mar 15, 2023

Description
fixes the bounds check and replaces the module level variable with this.

Part of the reason I wrote it this way is because fmsDiagObject_type is public so there's nothing guaranteeing that this routine will only be called on fms_diag_object (the module's instance) and not any other new instances of the type.

I guess it's really just a scoping issue but we could potentially add checks that this matches up memory address-wise to fms_diag_object to avoid this or change some public/private declarations.

How Has This Been Tested?
oneapi 2023.0 on amd

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@thomas-robinson thomas-robinson merged commit 6d01975 into NOAA-GFDL:dmUpdate Apr 6, 2023
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
…ad of the module variable (NOAA-GFDL#1160)

Co-authored-by: rem1776 <Ryan.Mulhall@noaa.gov>
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
…ad of the module variable (NOAA-GFDL#1160)

Co-authored-by: rem1776 <Ryan.Mulhall@noaa.gov>
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
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.

2 participants