[all-commits] [llvm/llvm-project] 27cf6b: [flang][runtime] Initialize uninitialized pointer ...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon May 8 15:25:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27cf6ba1d7bc623a5dca5c0ae82af98d0cdfc390
      https://github.com/llvm/llvm-project/commit/27cf6ba1d7bc623a5dca5c0ae82af98d0cdfc390
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M flang/include/flang/Semantics/tools.h
    M flang/include/flang/Semantics/type.h
    M flang/lib/Semantics/check-data.cpp
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/runtime-type-info.cpp
    M flang/lib/Semantics/tools.cpp
    M flang/lib/Semantics/type.cpp
    M flang/runtime/derived.cpp
    M flang/runtime/type-info.cpp
    M flang/test/Semantics/canondo01.f90
    A flang/test/Semantics/structconst07.f90
    R flang/test/Semantics/structconst07.f90#
    A flang/test/Semantics/typeinfo03.f90

  Log Message:
  -----------
  [flang][runtime] Initialize uninitialized pointer components

Pointer components without default initialization pose some
difficult (or impossible) problems when they appear as right-hand
side targets in pointer assignment statements; they may contain
garbage or stale data that looks enough like a valid descriptor
to cause a crash.  Solve the problem by avoiding it -- ensure
that pointers' descriptors are at least minimally established.

Differential Revision: https://reviews.llvm.org/D149979




More information about the All-commits mailing list