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
  • !5573

i#5570: fix visibility of safe read routines.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Abhinav Anil Sharma requested to merge i5570-fix-safe-read-visibility into master Jul 21, 2022
  • Overview 1
  • Commits 2
  • Pipelines 0
  • Changes 1

d_r_safe_read and safe_read_if_fast in core/unix/os.c are both non-weak symbols, but they are not exported. $ nm --defined ../../lib64/debug/libdynamorio_static.a | grep d_r_safe_read 00000000002962e8 t d_r_safe_read $ nm --defined ../../lib64/debug/libdynamorio_static.a | grep safe_read_if_fast 0000000000296272 t safe_read_if_fast

This causes drlibc code to use the wrong routines in is_elf_so_header.

On Ubuntu 20, there's a non-readable vsyscall entry in maps. When drlibc tries to read it, it crashes, and our main_signal_handler isn't able to recognize it as a safe_read crash.

After this fix, the correct d_r_safe_read is used, which helps the DR signal handler to recover as intended.

We may need to do the same for other WEAK symbols in drlibc, but we want to submit this fix first to get our CI green again asap.

Issue: #5570 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i5570-fix-safe-read-visibility