[flang-commits] [PATCH] D149979: [flang][runtime] Initialize uninitialized pointer components

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri May 5 12:16:16 PDT 2023


klausler created this revision.
klausler added reviewers: jeanPerier, Renaud-K, vzakhari.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a reviewer: sscalpone.
Herald added a project: All.
klausler requested review of this revision.

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.


https://reviews.llvm.org/D149979

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149979.519943.patch
Type: text/x-patch
Size: 9756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230505/b1532a46/attachment-0001.bin>


More information about the flang-commits mailing list