Commit d5759e3
committed
Clean up MachTask.mm's handling of m_exception_thread.
This was getting joined in ShutDownExcecptionThread (sic) but not
cleared. So this function was not safe to call twice, since you
aren't supposed to join a thread twice. Sadly, this was called in
MachTask::Clear and MachTask::Destroy, which are both called when
you tell debugserver to detach.
This didn't seem to cause problems IRL, but the most recent ASAN
detects this as an error and calls ASAN::Die, which was causing all
the tests that ran detach to fail.
I fixed that by moving the clear & test for m_exception_thread to
ShutDownExceptionThread. I also fixed the spelling of that routine.
And that routine was claiming to return a kern_return_t which no one
was checking. It actually returns a kern_return_t if there was a
Mach failure and a Posix error if there was a join failure. Since
there's really nothing you can do but exit if this fails, which is
always what you are in the process of doing when you call this, and
since we have already done all the useful logging in
ShutDownExceptionThread, I just removed the return value.1 parent 6a89439 commit d5759e3
File tree
3 files changed
+10
-7
lines changed- lldb/tools/debugserver/source/MacOSX
3 files changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1739 | 1739 | | |
1740 | 1740 | | |
1741 | 1741 | | |
1742 | | - | |
| 1742 | + | |
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
150 | 149 | | |
151 | | - | |
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
| |||
685 | 683 | | |
686 | 684 | | |
687 | 685 | | |
688 | | - | |
| 686 | + | |
689 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
| |||
702 | 703 | | |
703 | 704 | | |
704 | 705 | | |
| 706 | + | |
| 707 | + | |
705 | 708 | | |
706 | 709 | | |
707 | 710 | | |
| |||
713 | 716 | | |
714 | 717 | | |
715 | 718 | | |
716 | | - | |
| 719 | + | |
717 | 720 | | |
718 | 721 | | |
719 | 722 | | |
| |||
0 commit comments