[Lldb-commits] [flang] [clang] [compiler-rt] [lldb] [libclc] [llvm] [libcxxabi] [mlir] [lld] [libcxx] [clang-tools-extra] [libc] [ELF] Add internal InputFile (PR #78944)

2024-01-23 Thread Andrew Ng via lldb-commits




nga888 wrote:

Hi @MaskRay,

I think that the addition of `ctx.internalFile` has broken this statement from 
`class InputSectionBase`:
```
// The file which contains this section. Its dynamic type is always
// ObjFile, but in order to avoid ELFT, we use InputFile as
// its static type.
InputFile *file;
```

Which can then subsequently cause assertion failures in:
```
template  ObjFile *getFile() const {
  return cast_or_null>(file);
}
```

This is happening in our downstream port of `lld`, although I haven't yet 
figured out why we are only hitting this code path.

https://github.com/llvm/llvm-project/pull/78944
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [compiler-rt] [lld] [lldb] [clang] [libcxx] [llvm] [libcxxabi] [mlir] [flang] [clang-tools-extra] [libc] [libclc] [ELF] Add internal InputFile (PR #78944)

2024-01-25 Thread Andrew Ng via lldb-commits




nga888 wrote:

Sorry for the delay to reply but I've been more busy of late. I can confirm 
that it was a downstream code path which was calling `getFile()` for a 
`SyntheticSection` that was causing the assertion. This downstream code was 
effectively ignoring any "internal" sections based on the return from 
`getFile()`. It now first filters out sections of type `SyntheticSection` to 
avoid the assertion.

Even though there's no upstream code path that hits this issue, I think 
updating that comment and `getFile()` would be worthwhile to avoid any 
confusion.

Thanks!

https://github.com/llvm/llvm-project/pull/78944
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits