[all-commits] [llvm/llvm-project] 8d692b: [flang] Avoid crash in lowering for unlimited poly...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Fri Nov 25 04:48:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d692b4b8db82709355886939bfffb658db9e65a
      https://github.com/llvm/llvm-project/commit/8d692b4b8db82709355886939bfffb658db9e65a
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M flang/lib/Lower/CallInterface.cpp
    M flang/test/Lower/polymorphic.f90

  Log Message:
  -----------
  [flang] Avoid crash in lowering for unlimited polymorphic function return

The dynamic type of an unlimited polymorphic entity has the
derived category but does not have derived type spec. This leads
to a crash for a nullptr dereference. This patch avoids this crash
by checking if that the dynamic type is not unlimited polymorphic
before dereferencing the derived type spec.

Reviewed By: PeteSteinfeld

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




More information about the All-commits mailing list