Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #2089
Closed
Open
Issue created Dec 01, 2016 by Derek Bruening@derekbrueningContributor

is_thread_tls_initialized() fails to distinguish a thread in a new thread group from a fork child

This is the problem, the || part:

            return (tid == get_sys_thread_id() ||
                    /* We assume we can safely de-ref the dcontext now */
                    /* The child of a fork will initially come here */
                    os_tls->state.spill_space.dcontext->owning_process ==
                    get_parent_id());

A thread with CLONE_VM but not CLONE_THREAD will end up with a different thread id but will inherit the parent TLS (for use of MSR anyway where the zeroing of TLS_SEG has no effect: we plan to remove that zeroing anyway in #2088). It will pass is_thread_tls_initialized() which will wreak all kinds of havoc as it shares its parent's dcontext, resulting in strange crashes and hangs.

The plan is to redesign how is_thread_tls_initialized() works from the ground up. Xref #1986 (closed) and other cases where is_thread_tls_initialized() is also just not good enough.

Assignee
Assign to
Time tracking