Page MenuHomePhabricator

[Sanitizer] Protect UnwindFast with IsValidFrame on MIPS
Needs RevisionPublic

Authored by yln on Mar 5 2019, 11:24 AM.



I think we changed what we protect with IsValidFrame over the course of
our refactorings. Take a look at the code before we started:

Note that the code path that can potentially result in a fast unwind is
protected by IsValidFrame (for MIPS). This makes sense, since fast
unwind requires the frame info (bp, stack_top, stack_bottom) to work.
The current code only protects the slow unwind.

Event Timeline

yln created this revision.Mar 5 2019, 11:24 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 5 2019, 11:24 AM
Herald added subscribers: llvm-commits, Restricted Project, jdoerfert and 4 others. · View Herald Transcript
vitalybuka added inline comments.Mar 5 2019, 11:31 AM

Previously It protected both.
However original commit for this check mentions that MIPS use only Slow and it lacks IsValid check.

yln marked an inline comment as done.Mar 5 2019, 12:26 PM
yln added inline comments.

Just to make sure I understand:
MIPS only uses slow unwinder, which doesn't work when !IsValidFrame, despite it not explicitly taking (bp, top, bottom) as inputs?

To me, that is extremely confusing.

Should we try to make MIPS slow unwinder work (as in: return early without error) for !IsValidFrame? Instead of working around the symptom here?

vitalybuka added inline comments.Mar 5 2019, 12:50 PM

It would be nice if you have time for this.

vitalybuka requested changes to this revision.Apr 24 2019, 11:11 AM
This revision now requires changes to proceed.Apr 24 2019, 11:11 AM