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 7488091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:44:09+00:00 2026-05-29T14:44:09+00:00

How can I find the address bounds of the call stack at runtime (via

  • 0

How can I find the address bounds of the call stack at runtime (via some symbol or register)? I’m using nm and readelf to pick through my symbols and I’m not finding one. In the case of registers, it seems I’m limited to the current frame’s base and stack pointers and not the starting address.

I’d like to shy away from answers that involve parsing /proc/pid/maps – I always feel awkward parsing text for a systems-related problem. I’m using g++ on Linux x86/x86_64.

EDIT: Can I use the x86 segment register SS to calculate it?

  • 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. Editorial Team
    Editorial Team
    2026-05-29T14:44:11+00:00Added an answer on May 29, 2026 at 2:44 pm

    The /proc/pid/maps file on Linux provides some information on a process’s memory mappings:

    $ cat /proc/self/maps 
    00400000-0040b000 r-xp 00000000 08:03 709349                             /bin/cat
    0060a000-0060b000 r--p 0000a000 08:03 709349                             /bin/cat
    0060b000-0060c000 rw-p 0000b000 08:03 709349                             /bin/cat
    00a2d000-00a4e000 rw-p 00000000 00:00 0                                  [heap]
    7f6fdf418000-7f6fdf6bd000 r--p 00000000 08:03 489885                     /usr/lib/locale/locale-archive
    ...
    7fff4669e000-7fff466bf000 rw-p 00000000 00:00 0                          [stack]
    7fff467ff000-7fff46800000 r-xp 00000000 00:00 0                          [vdso]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
    

    The pmap(1) command formats this information into a display that I find more pleasing:

    $ pmap $$
    11680:   bash
    0000000000400000    896K r-x--  /bin/bash
    ...
    00007ff31ae2d000      8K rw---  /lib/x86_64-linux-gnu/ld-2.13.so
    00007fff66dd2000    132K rw---    [ stack ]
    00007fff66dff000      4K r-x--    [ anon ]
    ffffffffff600000      4K r-x--    [ anon ]
     total            29336K
    

    Incidentally, in the eglibc source file dl-execstack.c, I found the following comment: There is no portable way to know the bounds of the initial thread’s stack so as to mprotect it. This probably means the best mechanism is to parse the /proc/pid/maps files, even though I think we’re all agreed it is tacky.

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

Sidebar

Related Questions

Using Windbg, we can find some info about an !address . One of the
Can you find the IP address of a freinds phone using their phone number?
Does anyone have some recommendations on how I can find databases for random things
How can I find the address of a WndProc (of a window of another
How can I find the address of defined linked server in SQL Server 2008?
Can my Android app find the MAC address of the Wifi access point it
Using Maxmind's GeoIP software, we can narrow down the LONG/LAT of an IP address
I believe I've heard that you can find things like: IP Address an email
EDIT after Answers AND Comments : How can i find the IP address of
There is this question i ran into, how can we find the ip address

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.