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

  • Home
  • SEARCH
  • 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 9156955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:53:42+00:00 2026-06-17T12:53:42+00:00

Very simply put, if a C++ program executes the following function (say, on Windows

  • 0

Very simply put, if a C++ program executes the following function (say, on Windows 7, compiled with any VS version), then crashes subsequently and you attach a debugger with WER, or have WER generate a crash dump and later analyze this crash dump.

Is it possible from the information in the dump, to directly infer that this function was executed, that is, find traces pertaining to the thread that executed it that this function was executed.

Or are all execution traces gone when I corrupt the whole stack?

void bye_bye_stack() {
  int local = 42;
  int* stackaddr = &local;
  while(time(NULL) != NULL) { // prevent optimizations via call to time()
    ++stackaddr; // stack grows towards smaller addresses, so increasing the pointer will point to info we already put on the stack
    *stackaddr = local; // destroy stack content
    // program will (likely) crash here once we reach a read-only page
  }
}
  • 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-06-17T12:53:43+00:00Added an answer on June 17, 2026 at 12:53 pm

    In general, by destroying the stack the way you are doing, you will destroy the ‘callstack’, meaning that information about the previously called routines will be be gone. However, if you trigger an access violation / segmentation fault from within this routine, the instruction pointer where this happened will be stored, pointing to this routine.

    However, If the stack is corrupted and you return from this routine, it will be very hard, if not impossible, to figure out what happened.

    If you are trying to figure out what happened, I suggest using a debugging tool to find out where the stack gets ‘smashed’. If your intention is to destroy evidence of execution, make sure you ‘jump’ or ‘return’ from this routine, without triggering an exception.

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

Sidebar

Related Questions

Ok, I'm very simply trying to take this example... http://jsfiddle.net/shanabus/HGF59/ and put it on
Consider the following two statements out of a very simple assembly language program: DATA1
Very simple question. What does the term 'seeding' mean in general? I'll put the
Maybe a very simple question. How can I put in this code <Query> <Where>
I have a very simply subclass of UIButton that will fire off a custom
I have a very simply query like this: SELECT users.id, COUNT(others.id) as c FROM
I have a couple of links on some images. The code is very simply
I have a very weird thing to do and simply don't know how. This
I am trying to create a very simple chat window that simply has the
I'm developing a program using Windows 7. There are WCF services (soap, rest) that

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.