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

esp8266: Fix broken garbage collector #1232

Closed
wants to merge 1 commit into from
Closed

esp8266: Fix broken garbage collector #1232

wants to merge 1 commit into from

Conversation

atx
Copy link
Contributor

@atx atx commented May 6, 2015

As user_init() is not a true main functions, the stack pointer captured within
is not pointing at the base of the stack. This caused gc_collect being called
with sp being higher than stack_end, causing integer overflow and crashing as
gc tried to scan almost the entire address space.

@pfalcon
Copy link
Contributor

pfalcon commented May 6, 2015

This doesn't look like a "fix", but rather as a workaround. Then, it's worth an inline comment why STACK_END is used like that, because info in commit message is not so easily discoverable.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 92.85% when pulling 4b85b98 on atalax:esp-fixgc into cd87d20 on micropython:master.

As user_init() is not a true main functions, the stack pointer captured within
is not pointing at the base of the stack. This caused gc_collect being called
with sp being higher than stack_end, causing integer overflow and crashing as
gc tried to scan almost the entire address space.
@atx
Copy link
Contributor Author

atx commented May 6, 2015

Then, it's worth an inline comment why

Added a comment.

@dpgeorge
Copy link
Member

dpgeorge commented May 6, 2015

Merged in 28076f3.

@dpgeorge dpgeorge closed this May 6, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.85% when pulling 9fda441 on atalax:esp-fixgc into 9a42eb5 on micropython:master.

@atx atx deleted the esp-fixgc branch May 6, 2015 21:47
nickzoic pushed a commit to nickzoic/micropython that referenced this pull request Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants