WRF icon indicating copy to clipboard operation
WRF copied to clipboard

Fix undefined behavior in RSL_LITE

Open sfalmo opened this issue 2 years ago • 1 comments

Fix undefined behavior in RSL_LITE

TYPE: bug fix

KEYWORDS: RSL_LITE

SOURCE: Florian Sammüller (Universität Bayreuth)

DESCRIPTION OF CHANGES: Problem: RSL_LITE has undefined behavior due to implicitly declared functions. This may lead to a crash of wrf.exe in the initialization of nested domains if WRF is built with link-time optimization and with recent compilers (e.g. GCC 12).

Solution: Declare rsl_free() and destroy_list() before first use.

ISSUE: Fixes #1764

LIST OF MODIFIED FILES: M external/RSL_LITE/rsl_bcast.c M external/RSL_LITE/rsl_lite.h

TESTS CONDUCTED: -

RELEASE NOTE: -

sfalmo avatar Aug 31 '22 09:08 sfalmo

The Jenkins tests have passed:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           58
Number of Simulations  : 158           156        0
Number of Comparisons  : 95           92        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

weiwangncar avatar Aug 31 '22 15:08 weiwangncar

@mgduda Could you review this one please?

dudhia avatar Dec 08 '22 16:12 dudhia

@mgduda Could you review this one please?

Certainly. Should this PR be targeting the develop branch or the release-v4.4.2 branch?

mgduda avatar Dec 08 '22 18:12 mgduda

Since it is classified as a bug fix, I think we can put it in v4.4.2, but yes the target should be changed.

dudhia avatar Dec 08 '22 18:12 dudhia