[PATCH] D91787: [llvm-readobj] - Don't crash when relocation table goes past the EOF.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 03:39:25 PST 2020


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:141
+  /// Owner object. Used for error reporting.
+  const Binary *Obj;
   /// Error prefix. Used for error reporting to provide more information.
----------------
jhenderson wrote:
> Maybe make this a reference? It can't change after all, and is always valid.
Would be good, but I can't, because the code stops to compile.
Compiler removes copy assignment operator when a class has a reference member:

```
function was implicitly deleted because '`anonymous-namespace'::DynRegionInfo' has a data member '`anonymous-namespace'::DynRegionInfo::Owner' of reference type
```

It is needed in one place where `DynRegionInfo` os used as `Optional<>`.


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

https://reviews.llvm.org/D91787



More information about the llvm-commits mailing list