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
  • #5656
Closed
Open
Issue created Sep 20, 2022 by Nahome Bete@bete0Contributor

Function markers inserted inside a basic block result in invariant error

Function markers inserted inside a basic block resulting in "Function marker should be after a branch" invariant error.

In this case the function markers are inserted inside the basic block.

      874: T265782 ifetch       1 byte(s) @ 0x0000000003c37188 5d                   pop    %rbp
      875: T265782 read         8 byte(s) @ 0x00007f7e11f169a0 by PC 0x0000000003c37188
      876: T265782 ifetch       1 byte(s) @ 0x0000000003c37189 c3                   ret
      877: T265782 read         8 byte(s) @ 0x00007f7e11f169a8 by PC 0x0000000003c37189
      878: T265782 ifetch       3 byte(s) @ 0x0000000003d78868 49 89 c5             mov    %rax, %r13
      879: T265782 ifetch       3 byte(s) @ 0x0000000003d7886b 41 89 d6             mov    %edx, %r14d
      880: T265782 ifetch       5 byte(s) @ 0x0000000003d7886e bf 10 77 00 00       mov    $0x00007710, %edi
      881: T265782 <marker: function #3>
      882: T265782 <marker: function return address 0x3d78878>
      883: T265782 <marker: function argument 0x7710>
      884: T265782 ifetch       5 byte(s) @ 0x0000000003d78873 e8 08 4d f3 ff       call   $0x0000000003cad580
      885: T265782 write        8 byte(s) @ 0x00007f7e11f169a8 by PC 0x0000000003d78873
      886: T265782 ifetch       7 byte(s) @ 0x0000000003cad580 48 81 ff 01 04 00 00 cmp    %rdi, $0x00000401
      887: T265782 ifetch       6 byte(s) @ 0x0000000003cad587 0f 83 86 00 00 00    jnb    $0x0000000003cad613
      888: T265782 ifetch       7 byte(s) @ 0x0000000003cad613 48 81 ff 01 00 04 00 cmp    %rdi, $0x00040001

In this case the function markers are inserted between records for a single instruction.

     6642: T805696 ifetch       4 byte(s) @ 0x00000000099d5844 95e8e51e   bl     $0x000000001140ecbc -> %x30
     6643: T805696 ifetch       4 byte(s) @ 0x000000001140ecbc 58000050   ldr    <rel> 0x000000001140ecc4[8byte] -> %x16
     6644: T805696 <marker: function #3>
     6645: T805696 <marker: function return address 0x99d5848>
     6646: T805696 <marker: function argument 0x18>
     6647: T805696 read         8 byte(s) @ 0x000000001140ecc4 by PC 0x000000001140ecbc
     6648: T805696 ifetch       4 byte(s) @ 0x000000001140ecc0 d61f0200   br     %x16
     6649: T805696 ifetch       4 byte(s) @ 0x0000000019413500 aa0003e8   orr    %xzr %x0 lsl $0x00 -> %x8

Expected behavior The function markers should not be inserted between an instruction and its memrefs; This can cause issues with tools that do not expect markers amid records for a single instruction.

Assignee
Assign to
Time tracking