Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Space between ebp register and begin of a buffer
Post Flair (click to view more posts with a particular flair)
Post Body

Hi to all. I want to understand one thing: Having this kind of code: int main(){int buf[10];} when stack frame is allocated for main, ra and old fp are stored on the stack and ebp point to the actual esp. Now ebp point to the base of the stack frame. Then buf is allocated. So distance between ebp and the begin of the stack is 10? If yes, why when I calculate difference with the help of gdb, it returns a number little bigger than size of the buffer?

Edit: typo

Author
Account Strength
80%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
492
Link Karma
155
Comment Karma
330
Profile updated: 5 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago