This solves PR26908. ASan detects it, but not by default.
It needs ASAN_OPTIONS=detect_stack_use_after_return=true
Ah, thank you for finding this one! I quickly took a look when I updated the bug but couldn't figure out what was wrong.
I'd like to keep the parser function in DriverUtils. I'd define a new class to own ELFOptTable in DriverUtils.
It looks like it should, but I can't try it out now.
I can try it tonight or tomorrow morning at most. If you want, you can
compile llvm+lld with ASan and turn on the Asan option (double-check that
you catch the bug first ;-) ).
Should we add ASAN_OPTIONS=detect_stack_use_after_free=true to the
It would have caught this bug a long time ago.
We might also need to do some cleanup before we can do it.