The blog post proposes a simple solution (using a std::deque instead of a smallvector to store section entries). They also propose an alternative, namely to avoid taking any section reference at all. This patch enforces the latter using a proxy class. I'm totally fine with the dequeue approach too, and will gladly update the patch if needed.
Drive by code review, no comment on the bug or proposed solution.
|83 ↗||(On Diff #246411)|
How come SectionEntryProxy is sometimes passed by reference, but other times passed by value to different functions in this CL?
|105 ↗||(On Diff #246411)|
Every time I see Sections in RuntimeDyldELF.cpp, I think "This should be using getSection()."
|134 ↗||(On Diff #246411)|
If this is the same between MachO and ELF (and I suspect all other derived classes), can it be a method on a shared base class?
|33 ↗||(On Diff #246411)|
Why not a &? Won't this result in a copy-assignment?