[PATCH] D144565: dwp check overflow

zhuna via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 04:43:41 PST 2023


zhuna8616 added inline comments.


================
Comment at: llvm/test/tools/llvm-dwp/X86/overflow-warning.test:4
+RUN: llvm-dwp -e hello.o -e main.o -warn-overflow -o overflow.dwp 2>&1 | FileCheck %s
+CHECK: warning: Section size overflow in debug_info.dwo
----------------
ayermolo wrote:
> Can you check that overflow behavior is preserved?
Do I check it as in https://reviews.llvm.org/D137882 ? I may have to copy much of the code if I am to check overflow behavior as in this post.

I found a invalid_cu_index.test that goes like:
```
RUN: not llvm-dwp %p/../Inputs/invalid_cu_index/x.dwp -o %t 2>&1 | FileCheck %s
CHECK: error: failed to parse cu_index
```

Looks like it's parsing cu index with llvm-dwp directly. I added a similar check and it passed.
```
RUN: llvm-dwp overflow.dwp -o overflow-warned.dwp
```
Is this line of code sufficient for verifying overflow behavior? Or should I follow this post https://reviews.llvm.org/D137882 instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144565



More information about the llvm-commits mailing list