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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

make: Fix memory corruption bug by adding -stack-size flag #76

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Feb 13, 2023

Fix memory corruption bug by adding -stack-size flag to
tinygo build to fix memory corruption issues.

Revert sleeping yielder to interface

Link: https://gophers.slack.com/archives/CDJD3SUP6/p1676264760211069

Programs for testing:

Print circles

func target x:num y:num
  move x y
  colors := ["yellow" "gold" "orange" "red" "maroon"]
  radius := 5

  for c := range colors
    color c
    circle radius
    radius = radius - 1
  end 
end

target 40 40

Stop/Start non-sleeping endless loop

while true
  print "馃浖"
end

Stop/Start with sleep

for i := range 0 100 0.1
  clear
  dot i 50

  sleep 0.01
end

func clear
  color "white"
  move 0 0
  rect 100 100
end

func dot x:num y:num
  color "red"
  move x y
  circle 10
end

Revert sleeping yielder to interface, the bugfix reverting turning the
interface into a function was only introducing another bug.
@github-actions
Copy link

github-actions bot commented Feb 13, 2023

firebase-deployment: https://evy-lang--76-r6ewrehd.web.app (85bc782)

@juliaogris juliaogris force-pushed the fix-memcorruption branch 3 times, most recently from 12260ce to 2d36790 Compare February 13, 2023 05:44
Add -stack-size flag to tinygo build to fix memory corruption issues.
https://gophers.slack.com/archives/CDJD3SUP6/p1676264760211069

Yay!!
Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:green_stack: LGTM

@juliaogris juliaogris changed the title evaluator: Remove defer statements in evaluator make: Fix memory corruption bug by adding -stack-size flag Feb 13, 2023
@juliaogris juliaogris merged commit 8f610a6 into master Feb 13, 2023
@juliaogris juliaogris deleted the fix-memcorruption branch February 13, 2023 06:01
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

2 participants