Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 53641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:05:43+00:00 2026-05-10T17:05:43+00:00

I am writing a tracing tool which needs to deal with the output of

  • 0

I am writing a tracing tool which needs to deal with the output of a a JIT, so the stack can look pretty bizarre at times. I’d like to try to apply some heuristics to addresses to determine if they are code, data or garbage. (If I’m wrong some of the time, it’s no big deal; however if the process crashes, not so much.)

I can cat /proc/«pid»/maps to get a list of the VM mappings for a process in Linux. Is it possible to access this information (or any subset) from inside the process without parsing that file? It’d be ideal to examine the rwx bits for an address. Essentially, I want a “read” version of mprotect(2).

If I can’t do this, how about determining if an access to a certain address will cause a segmentation fault? (There is already a SIGSEGV handler installed in this case and I can’t easily overwrite it, or I’d just do that.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:05:43+00:00Added an answer on May 10, 2026 at 5:05 pm

    Looking through all the memory-related functions I discovered I can use munlock() to determine if the page is valid.

    bool is_address_valid(ADDRINT addr) {   static int pagesize = getpagesize();    const void *foo = (const void *)(addr / pagesize * pagesize);    if (munlock(foo, 1) == -1) {     fprintf(stderr, 'munlock(%p=>%p, 1) failed: %s\n', addr, foo,             strerror(errno));     return false;   }   return true; } 

    Pretty disgusting, but it does prevent my code from crashing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing trading software and I need every single microsecond in speed. What can
Writing htaccess that allows me to remove index.php from the URL can confuse search
I'm considering writing my own tool for tracking visitors/sales as Google Analytics and others
In a bit of Python I'm writing (a command line and filter testing tool:
I am writing tracing class to find the execution time of modules/methods. I have
I'm writing a plugin for ReSharper 7, and I'd like to be able to
I am writing a software which sells certain service to it's user. I am
I would like to start writing a grade tracking application in java. I would
I'm having some problems tracing the reason that I can't load a java(fx) applet.
I'm writing a huffman compressor and decompressor (in C++) that needs to work on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.