[PATCH] D79760: [WinEH64] Fix a crush issue when c++ exception nested in a particular form.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 20:29:06 PDT 2020


pengfei added a comment.

@andrew.w.kaylor I tested for below 3 cases, and get the runtime result for them in different compilers.

  void ex1() {
    try {
      throw 1;
    } catch (...) {
      try {
        throw 2;
      } catch (...) {
      }
    }
  }
  void ex2() {
    try {
      try {
        throw 1;
      } catch (...) {
        throw 2;
      }
    } catch (...) {
    }
  }
  void ex3() {
    try {
      throw 1;
    } catch (...) {
      try {
        try {
          throw 2;
        } catch (...) {
          throw 3;
        }
      } catch (...) {
      }
    }
  }

F11911208: p1.PNG <https://reviews.llvm.org/F11911208>
You can see that the layout of try map table of some nested exception is different under 32 and 64 bit MSVC. This patch makes LLVM has the same behavior with MSVC.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79760/new/

https://reviews.llvm.org/D79760





More information about the llvm-commits mailing list