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
  • Merge requests
  • !5117

i#4953 ubuntu20: Fix issues on common.decode test in x86-32

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Abhinav Anil Sharma requested to merge i4953-common-decode-crash-fix into master Sep 22, 2021
  • Overview 4
  • Commits 10
  • Pipelines 0
  • Changes 4

Fixes some issues related to preservation of regs in the common.decode test, seen on the x86-32 bit suite on latest Ubuntu versions.

Avoids clobbering the stack reg in the test_modrm16 test by saving it to a scratch reg before executing the test modrm instr that overwrites it, and restoring before ret. Without this, the test_modrm16 invocations that write to esp would crash at ret.

Removes sigsetjmp before all test_modrm16 which is not required now as it isn't expected to crash anymore; this also obviates the need to use a separate signal stack on UNIX. In the earlier setup of this test, even if some iteration of the modrm tests crashed due to an unexpected issue, the test would go on to the next iteration. This could have hidden some new issues from showing up in tests.

Fixes an issue in mangle_seg_reg, to avoid picking the same reg as scratch for the 16-bit offset and the app TLS base offset, and avoid sequences like the following:

mov    %eax -> %fs:0x00[4byte]
mov    %fs:0x48[4byte] -> %eax
mov    %eax -> %fs:0x00[4byte]
addr16 lea    (%bx,%si) -> %eax
mov    (%eax,%eax)[4byte] -> %ebx

Preserves callee saved regs in the test_avx512_vex test, which was causing some crashes as well.

Removes unnecessary buf argument to test_avx512_vex which is unused.

Adds some more logs, for some helpful verbosity.

Removes common.decode from ignore list. Verified locally that there was no failure in 1000 runs on 32-bit x86.

Issue: #4953 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i4953-common-decode-crash-fix