O2 and O1 compilation produce a segmentation fault due to stack corruption (when debugging we saw some extra pushes from the stack) on callbacks return. This happens on windows 32, when compiling with mingw gcc 7.4.0. The issue can be reproduced easily by running the Alien qsort example in latest vms in both Pharo and Squeak. This PR proposes to patch just the thunkEntry function. Not optimizing just that function solves the issue in our environment, though maybe there is a more fine-grained solution. We should still investigate what is the particular optimization that causes the problem. You can view, comment on, or merge this pull request online at:https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/353 Commit Summary
File ChangesPatch Links:
— |
Sounds good. I'm using this version which seems up-to-date on cygwin distrib:
— |
In reply to this post by David T Lewis
Merged #353 into Cog. — |
In reply to this post by David T Lewis
qsort still SEGFAULTs for me when compiled via Cygwin with When trying to qsort a list of 10 floats, the first callback is fine but the second callback has a different address for the callback context -- which should not happen -- and shows bogus values for the stack arguments. Maybe it is related to some sort of stack optimization? Works fine with DEBUG build, does also SEGFAULT with ASSERT build. — |
Free forum by Nabble | Edit this page |