Skip to content

Conversation

dos1
Copy link
Contributor

@dos1 dos1 commented May 3, 2019

detached_thread_func_trampoline freed the outer thread at its end. If outer->proc
was really fast to finish, _al_thread_detach could get called with &outer->thread
as its argument after outer was already freed.

Usually it would be fast enough to not ever be overwritten after freeing, but tools
like asan explicitly overwrite freed memory, leading to reproducible crash.

…already gone

detached_thread_func_trampoline freed the outer thread at its end. If outer->proc
was really fast to finish, _al_thread_detach could get called with &outer->thread
as its argument after outer was already freed.

Usually it would be fast enough to not ever be overwritten after freeing, but tools
like asan explicitly overwrite freed memory, leading to reproducible crash.
@dos1
Copy link
Contributor Author

dos1 commented May 12, 2019

I'm getting some segfaults with this patch now, let's hold with it.

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.

1 participant