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
  • #1984
Closed
Open
Issue created Aug 03, 2016 by Administrator@rootContributor

sigaction seems to return new action as old action

Created by: egrimley

This seems to happen on all architectures. Test program:

#include <signal.h>
#include <stdio.h>
#include <string.h>

int main()
{
    struct sigaction act, oldact;
    memset(&act, 0, sizeof(act));
    memset(&oldact, 0, sizeof(act));

    act.sa_handler = (void *)0x1001;
    sigaction(28, &act, &oldact);
    printf("%p\n", oldact.sa_handler);

    act.sa_handler = (void *)0x1002;
    sigaction(28, &act, &oldact);
    printf("%p\n", oldact.sa_handler);

    act.sa_handler = (void *)0x1003;
    sigaction(28, &act, &oldact);
    printf("%p\n", oldact.sa_handler);

    return 0;
}

Output running natively:

(nil)
0x1001
0x1002

Output running under DynamoRIO:

0x1001
0x1002
0x1003
Assignee
Assign to
Time tracking