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

Manually save and restore stack pointer between ucontext switching. #185

Merged
merged 1 commit into from
Jun 12, 2015
Merged

Manually save and restore stack pointer between ucontext switching. #185

merged 1 commit into from
Jun 12, 2015

Conversation

albertnetymk
Copy link
Contributor

No description provided.

@EliasC
Copy link
Contributor

EliasC commented Jun 11, 2015

The quicksort program from issue #179 still segfaults for me. Is fixing this issue the purpose of this PR?

@EliasC
Copy link
Contributor

EliasC commented Jun 11, 2015

Addendum: With this PR, I cannot reproduce the segfault when debugging!

bash-3.2$ ./quicksort
Debug: Random list generated successfully
Segmentation fault: 11
bash-3.2$ lldb quicksort
(lldb) target create "quicksort"
Current executable set to 'quicksort' (x86_64).
(lldb) r
Process 10983 launched: '/Users/Elias/Dropbox/PhD/encore/programs/quicksort' (x86_64)
Debug: Random list generated successfully
Checking...
List was sorted correctly!
Process 10983 exited with status = 0 (0x00000000) 

@albertnetymk
Copy link
Contributor Author

Yes, exactly. That' odd; it was working when I tested it on my air.

@EliasC
Copy link
Contributor

EliasC commented Jun 11, 2015

Can we have a third opinion? :)

@albertnetymk
Copy link
Contributor Author

Still, it works OK on my air. Anyone else could test it on mac?

@EliasC
Copy link
Contributor

EliasC commented Jun 12, 2015

It seems this was one of those bugs where we would see crashes when run from within Emacs, but not otherwise. I will merge this.

EliasC added a commit that referenced this pull request Jun 12, 2015
Manually save and restore stack pointer between ucontext switching.
@EliasC EliasC merged commit 797b39d into parapluu:master Jun 12, 2015
@EliasC EliasC deleted the mac-ucontext branch June 12, 2015 12:18
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.

2 participants