[libcxx-commits] [PATCH] D143071: [libc++] Avoid ODR violations in __exception_guard

Shoaib Meenai via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 8 21:45:48 PST 2023


smeenai added a comment.

I'm still seeing LTO errors after this patch:

  fragment covers entire variable
    call void @llvm.dbg.value(metadata i64 poison, metadata !798696, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !798698
  !798696 = !DILocalVariable(name: "__first", arg: 2, scope: !798693, file: !16879, line: 520, type: !159997)
  fragment is larger than or outside of variable
    call void @llvm.dbg.value(metadata ptr %5, metadata !798696, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)), !dbg !798698
  !798696 = !DILocalVariable(name: "__first", arg: 2, scope: !798693, file: !16879, line: 520, type: !159997)
  fragment covers entire variable
    call void @llvm.dbg.value(metadata i64 poison, metadata !798697, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !798698
  !798697 = !DILocalVariable(name: "__last", arg: 3, scope: !798693, file: !16879, line: 520, type: !159997)
  fragment is larger than or outside of variable
    call void @llvm.dbg.value(metadata ptr %7, metadata !798697, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)), !dbg !798698
  !798697 = !DILocalVariable(name: "__last", arg: 3, scope: !798693, file: !16879, line: 520, type: !159997)
  fragment is larger than or outside of variable
    call void @llvm.dbg.value(metadata ptr %9, metadata !798696, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)), !dbg !798698
  !798696 = !DILocalVariable(name: "__first", arg: 2, scope: !798693, file: !16879, line: 520, type: !159997)
  fragment is larger than or outside of variable
    call void @llvm.dbg.value(metadata ptr %12, metadata !798696, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)), !dbg !798698
  !798696 = !DILocalVariable(name: "__first", arg: 2, scope: !798693, file: !16879, line: 520, type: !159997)
  LLVM ERROR: Broken module found, compilation aborted!

I went to the libc++ source state right before D133661 <https://reviews.llvm.org/D133661> and was able to build fine, and then I checked out that change and applied this one directly on top (versus just checking out this revision, to ensure there were no other changes) and repro'd, so it's definitely caused by these patches. There were a bunch of other errors that this patch did fix, but not these.

Unfortunately I'm not sure how to create a standalone reproducer (this is part of a giant internal build that I can't share as-is). If I use `--save-temps` during LTO and then use `llvm-dis` to convert to textual IR to try reducing it, it just ignores the invalid debug info, which defeats the whole purpose. Does anyone have suggestions for that?

I also requested a backport to 16.0.1 in https://github.com/llvm/llvm-project/issues/61276, since it's late in the LLVM 16 release cycle now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143071



More information about the libcxx-commits mailing list