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
  • #4043
Closed
Open
Issue created Jan 22, 2020 by Administrator@rootContributor

dynamorio could crash when clone syscall's newsp == 0

Created by: hac425xxx

when newsp == 0, we should save the mc->sp to record->app_thread_xsp

Bug fix

core/unix/signal.c

@@ -632,6 +632,13 @@ create_clone_record(dcontext_t *dcontext, reg_t *app_thread_xsp)
        record = (clone_record_t *)(dstack - sizeof(clone_record_t));
        ASSERT(ALIGNED(record, get_ABI_stack_alignment()));
        record->app_thread_xsp = *app_thread_xsp;

        /* fix bug when  clone syscall's argument: newsp == 0  (for example: vfork in android libc.so)
         */
        if(record->app_thread_xsp == 0)
        {
            record->app_thread_xsp = get_mcontext(dcontext)->sp;
        }
        /* asynch_target is set in d_r_dispatch() prior to calling pre_system_call(). */
        record->continuation_pc = dcontext->asynch_target;
        record->clone_flags = dcontext->sys_param0;
Assignee
Assign to
Time tracking