Risk stack-use-after-scope error when getting const reference of value held in optional

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Repl 2021-03-22
    • 185
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This is the block of code that's problematic. getTxnNumber() and getStatementId() return by value and the operator* gets in the way so that the lifetime of the temporary optional is not extended.

              Assignee:
              Lingzhi Deng
              Reporter:
              Lingzhi Deng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: