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

Arguments does not put on stack correctly #45

Closed
hangpark opened this issue Apr 9, 2017 · 1 comment
Closed

Arguments does not put on stack correctly #45

hangpark opened this issue Apr 9, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@hangpark
Copy link
Owner

hangpark commented Apr 9, 2017

In current implementation, hex_dump() displays the stack memory about the test args-none as below:

bfffffd0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
bfffffe0  00 00 00 00 01 00 00 00-e8 ff ff bf f6 ff ff bf |................|
bffffff0  00 00 00 00 00 00 61 72-67 73 2d 6e 6f 6e 65 00 |......args-none.|

But this is not correct since argv[0] is set by bfffffe8, not bfffffec (at bfffffe8).

@hangpark hangpark added the bug label Apr 9, 2017
@hangpark hangpark added this to the Project #2 milestone Apr 9, 2017
@hangpark hangpark self-assigned this Apr 9, 2017
hangpark added a commit that referenced this issue Apr 9, 2017
Fix `push_args_on_stack()` to put address of the first argument (`argv[0]`) correctly.

Change usages of memcpy to simple pointer assignments.
hangpark added a commit that referenced this issue Apr 9, 2017
Fix `push_args_on_stack()` to put address of the first argument (`argv[0]`) correctly.

Change usages of `memcpy()` to simple pointer assignments.
hangpark added a commit that referenced this issue Apr 9, 2017
[#45] Fix addr of first arg and not use memcpy
@hangpark
Copy link
Owner Author

hangpark commented Apr 9, 2017

Done by PR #46.

@hangpark hangpark closed this as completed Apr 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant