Opened 3 years ago

Closed 14 months ago

#1922 closed Bug (duplicate)

Uninitialized variable in sbcapr.F90

Reported by: mdunphy Owned by: jchanut
Priority: low Milestone:
Component: OCE Version: release-3.6
Severity: minor Keywords:
Cc:

Description

Context

If ln_apr_dyn is false, then we do not call sbc_apr and we do not read namelist namsbc_apr, and thus we do not initialize ln_apr_obc

However, bdydta.F90 makes use of ln_apr_obc, and this can lead to a segfault

Analysis

We must not use uninitialized vars

Fix

Two choices:
A) Add IF ( ln_apr_dyn ) THEN … ENDIF around the code in bdydta.F90 that uses ln_apr_obc
B) Initialize ln_apr_obc to .FALSE. where it is declared at the top of sbcapr.F90

Commit History (2)

ChangesetAuthorTimeChangeLog
8524cbricaud2017-09-15T13:59:24+02:00

bugfix in trunk for ticket #1922

8523cbricaud2017-09-15T13:56:16+02:00

bugfix in nemo_v3_6_STABLE for ticket #1922

Change History (4)

comment:1 Changed 3 years ago by clevy

  • Owner changed from nemo to jchanut

comment:2 Changed 3 years ago by cbricaud

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 14 months ago by smueller

  • Resolution fixed deleted
  • Severity set to minor
  • Status changed from closed to reopened

While the reported bug has been fixed in the release-3.6 version of the source code, it is still present in the trunk version (see ticket #2295).

comment:4 Changed 14 months ago by smueller

  • Resolution set to duplicate
  • Status changed from reopened to closed

This ticket has been superseded by ticket #2295.

Note: See TracTickets for help on using tickets.