Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible mistake in chapter 3.2 #26

Closed
entropidelic opened this issue Apr 5, 2022 · 1 comment
Closed

Possible mistake in chapter 3.2 #26

entropidelic opened this issue Apr 5, 2022 · 1 comment
Assignees
Labels
bug Something isn't working (including software I made) mistake Minor mistake such as a spelling mistake.

Comments

@entropidelic
Copy link

First of all, thank you so much for writing this material, it is amazing.

I am a beginner with these low level topics so I might be wrong, but when I was reading the Stack explanation, these two parts seemed contradictory to me:

  • When data is pushed onto the stack, the stack grows up, towards lower memory addresses.

  • The stack pointer (RSP/ESP/SP) is used to keep track of the top of the stack and the base pointer (RBP/EBP/BP) is used to keep track of the base/bottom of the stack. This means that when data is pushed onto the stack, the stack pointer is increased since the stack grew towards higher addresses.

I think that the second quote should be,

The stack pointer (RSP/ESP/SP) is used to keep track of the top of the stack and the base pointer (RBP/EBP/BP) is used to keep track of the base/bottom of the stack. This means that when data is pushed onto the stack, the stack pointer is decreased since the stack grew towards lower addresses.

Let me know if I am getting it wrong :)

@0xZ0F 0xZ0F self-assigned this Apr 5, 2022
@0xZ0F 0xZ0F added bug Something isn't working (including software I made) mistake Minor mistake such as a spelling mistake. labels Apr 5, 2022
@0xZ0F
Copy link
Owner

0xZ0F commented Apr 5, 2022

You're correct, that's definitely an issue. It's been fixed, thanks for letting me know!

Fixed in commit: 7a83f12

@0xZ0F 0xZ0F closed this as completed Apr 5, 2022
@0xZ0F 0xZ0F pinned this issue Apr 5, 2022
@0xZ0F 0xZ0F unpinned this issue Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (including software I made) mistake Minor mistake such as a spelling mistake.
Projects
None yet
Development

No branches or pull requests

2 participants