Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Oct 1, 2018

No description provided.

On macOS Mojave, it seems that changing the mapping of stack pages can lead to corruption bugs.

mono#10802
For now we do it on the altstack which can be problematic.
@BrzVlad
Copy link
Member Author

BrzVlad commented Oct 1, 2018

@vargaz what are your thoughts on this ?

Copy link
Contributor

@kumpera kumpera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just disable MONO_ARCH_SIGSEGV_ON_ALTSTACK for OSX instead of this.

* We don't do soft stack overflow handling. Do our best here.
* FIXME Don't do it in signal handler
*/
mono_sigctx_to_monoctx (ctx, &mctx);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard stack overflow should always abort. This will 99.999% lead to a secondary abort that will hide the actual issue.

@vargaz
Copy link
Contributor

vargaz commented Oct 1, 2018

I think only the main thread has issues, the other threads should be fine.

@BrzVlad
Copy link
Member Author

BrzVlad commented Oct 1, 2018

@vargaz as far as I know that would be correct.

@vargaz @kumpera Do you think it would be best, for now, to just not map the stack guard for the main thread, and let overflows on the main thread kill the app ?

@vargaz
Copy link
Contributor

vargaz commented Oct 1, 2018

Probably, without guard pages its hard to cleanly detect and handle the overflow.

@kumpera
Copy link
Contributor

kumpera commented Oct 1, 2018

Hard stack overflow should be fatal, if we have code that tried anything but to crash, we should change it.

@BrzVlad
Copy link
Member Author

BrzVlad commented Oct 1, 2018

#10899

@BrzVlad BrzVlad closed this Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants