Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception handing on WSL #3

Merged
merged 3 commits into from
Mar 8, 2020

Conversation

sobolevsv
Copy link

This fix makes libunwind working on Windows Subsystem for Linux.
#ClickHouse/ClickHouse#6480

syscall mincore on WSL return -1 and breaks exception handing.
I think it is a bad idea to make a syscall while unwinding stack.
compiling with libstdc++(option USE_LIBCXX) also makes clickhouse working on WSL.

this fix makes libunwind working on Windows Subsystem for Linux
@alexey-milovidov
Copy link
Member

alexey-milovidov commented Mar 7, 2020

We cannot avoid this type of hack. Otherwise we will get segfault during asynchronous unwiding.
It's possible to do some workaround instead.

@alexey-milovidov
Copy link
Member

Please tell what is the value of errno after this call on WSL?

@alexey-milovidov
Copy link
Member

We can modify our check that if the errno is not EFAULT then proceed.

on WSL mincore syscall is not implemented and return ENOSYS
@sobolevsv
Copy link
Author

thank you for a hint to check errno! mincore is not implemented on WSL, errno = 38
please see my quickest workaround :)

@sobolevsv sobolevsv changed the title get rid of "dirty hack" (SYS_mincore) Fix exception handing on WSL Mar 8, 2020
Copy link
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

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

Ok.

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.

2 participants