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
  • #9
Closed
Open
Issue created Nov 27, 2014 by Derek Bruening@derekbrueningContributor

decoding: decoder max should match MAX_INSTR_LENGTH

From derek.br...@gmail.com on February 14, 2009 10:10:53

Today we use a MAX_INSTR_LENGTH define of 17 in various places yet our own decoder does not stop at 17. The two should match so we can allocate a buffer and decode from it. Since it is a conservative estimate the maximum should probably be higher since some processors (at list historically) have allowed 18, 20, and even (so I've heard, never seen) 24-byte instructions. The AMD manual claims 15 is the limit, and 17 used to be the typically assumed limit, but the actual limit at which a processor raises #GP is variable. We shouldn't make it too high though since we don't want to read off onto the next page when not necessary.

Example of our decoder on a 23-byte instr (this raises #GP on my Q9300):

0x080494a8 66 66 66 66 66 66 66 data16 nop 0x00000000(%eax,%eax,1) 66 66 66 66 66 66 66 66 0f 1f 84 00 00 00 00 00

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=9

Assignee
Assign to
Time tracking