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 --
* Patch callback thunkEntry to not optimize, failing in win32 using gcc 7.4.0
-- File Changes --
M platforms/Cross/plugins/IA32ABI/ia32abicc.c (2)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/353.patchhttps://github.com/OpenSmalltalk/opensmalltalk-vm/pull/353.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/353
In addition to the existing alpha blending rules (24 and 34), I propose 3 new additional rules.
Check https://en.wikipedia.org/wiki/Alpha_compositing
Existing rule 34 is a correct implementation of Alpha Blending for scaled forms, i.e. if premultiplied alpha is used. But rule 24 is a correct implementation of non-scaled forms, only for the case where destination is opaque (i.e. it's alpha is 1.0 in every pixel). If destination includes translucency (or it is completely transparent), the result is not correct. In order to fix it, the RGB of each pixel need to be divided by the pixel alpha.
The proposed blendUnscaled is the basic (for non-scaled forms) alpha blending described in Wikipedia. Note that users knowing that destination background is opaque might call the faster rule 24 instead.
The other two additional proposed rules are for converting to and from premultiplied alpha.
EXISTING blend 24 alphaBlend
resultAlpha = srcAlpha + destAlpha*(1-srcAlpha)
resultRGB = srcAlpha*source + (1-srcAlpha)*dest
EXISTING blendAlphaScaled 34 alphaBlendScaled
resultRGBA = source + (1-srcAlpha)*dest
NEW PROPOSED multiplyRGBByAlpha
Non premultiplied alpha -> premultiplied alpha. Only uses destination. Alpha unmodified. For each RGB component,
resultRGB = dest*destAlpha
NEW PROPOSED divideRGBByAlpha
Premultiplied alpha -> non premultiplied alpha. Only uses destination. Alpha unmodified. For each RGB component,
resultRGB = dest/destAlpha
NEW PROPOSED blendUnscaled
Equivalent to blend, and then divideRGBByAlpha
resultAlpha = srcAlpha + destAlpha*(1-srcAlpha)
resultRGB = (srcAlpha*source + (1-srcAlpha)*dest) / resultAlpha
This would allow handling of scaled (premultiplied-alpha) forms, and blending of regular forms including translucency, without the need to call slower smalltalk code to fix the results.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/505
After making sure a string was not interned, ( "Symbol findInterned: 'test123'" returned nil ), I did
| s | s := #TEST123.
s translateToLowercase.
s -> (Symbol findInterned: s)
and the resulting s is a Symbol and it is not interned.
To make sure that the primitive is invoked (and not its fallback code), put a halt in ByteString class >> #translate:from:to:table:
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/561
I am trying to build the unix sources for this project, exactly following the `HowToBuildFromSources` manual (the easy way). But unfortunately, when running `make` I get an error that `bld/plugins.int` is missing:
```
$ make
[ -d bld ] || mkdir bld
[ -f bld/Makefile ] || ( cd bld; ../config/configure; )
checking for gcc... gcc
# ... (75 lines skipped)
checking whether to build static libraries... no
/workspace/opensmalltalk-vm/src
/workspace/opensmalltalk-vm/src/plugins
checking sanity of generated src directory... bad
missing file: /workspace/opensmalltalk-vm/platforms/unix/bld/plugins.int
make: *** [Makefile:5: all] Error 1
```
See yourself:
[](https://gitpod.io/#snapshot/9bc102f3-ba84-437f-a226-a8851782c41b)
Is it me or is the documentation of the build process not up to date? Looking forward to your help!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/507
UnixProcess class>>forkSqueak is no longer working. The forked child process VM crashes with segmentation fault. Testing with VMs from bintray shows that version 5.0-202009300634 works, and any version 5.0-202010192227 or later fails. Stack dump sometimes (but not always) shows failure in aioPoll() for example:
*/usr/local/bin/../lib/squeak/5.0-202101160259/squeak(aioPoll+0x12e)[0x4bc0fe]
I am not able to catch the failure in gdb because it happens in the child process. My initial guess is that it may be related to the epoll enhancements added in this time frame, because forking the VM requires initializing things like this in the new child VM process.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/548
Hi all,
I think this is not a new issue, but I am experiencing it with increasing frequency on my Win 10 machine: When instantiating SqueakSSL, primitiveCreate fails. I don't see an error in the console so I cannot tell more details about the error. Sometimes restarting my image helps, but right now, it does not. Other images running with the same VM (202010232046) can still access the internet via SSL.
Maybe it plays a role that the affected image puts the plugin much more under stress by always holding at least one open connection to a server.
Is this a known problem? Are there any workarounds?
Looking forward to a fix,
Christoph
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554
VM: win32x86.cog.spur (202011160746, VMMaker.oscog-eem.2887)
OS: Windows 10
SQ: Squeak6.0alpha #20077
I suppose that `Context >> #objectClass:` (primitive 111) answers `Context` from time to time. I cannot really debug it, though. Sometimes `Context >> #printOn:` does the right thing.

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/536
The linux builds are failing for a while after some re-arrangement of header order.
It happens that config.h cannot work after linux features.h, so the former should be included before the later.
An #error directive checks and protect against this case.
One possible workaround could be to move #include "config.h" ahead in a few files...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560
This enables the linux builds again, while preserving windows and macos builds.
That is a fix for https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560
If this is compatible with TERF VM, then it should be merged ASAP, the builds are red for too long.
(we'll have to inquire next point of failure...)
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562
-- Commit Summary --
* always include <stdio.h> **BEFORE** defining fseeko/ftello
* Discard the EXPORT from sqAssert.h for declaring VM functions
* Make sure that config.h is included first
* Generate source with VMMaker.oscog-nice.2957 so as to restore sqConfig.h inclusion at top
* try and omit HAVE_CONFIG_H for compiling getVersion
-- File Changes --
M platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c (3)
M platforms/Cross/plugins/IA32ABI/xabicc.c (5)
M platforms/Cross/plugins/SoundCodecPrims/sqSoundCodecPluginBasicPrims.c (4)
M platforms/Cross/plugins/Squeak3D/b3dInit.c (3)
M platforms/Cross/plugins/Squeak3D/b3dMain.c (3)
M platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c (4)
M platforms/Cross/vm/sqAssert.h (11)
M platforms/Cross/vm/sqHeapMap.c (4)
M platforms/Cross/vm/sqSCCSVersion.h (2)
M platforms/Cross/vm/sqVirtualMachine.c (3)
M platforms/unix/config/getversion.c (1)
M platforms/unix/plugins/FileAttributesPlugin/faSupport.c (3)
M platforms/unix/vm/aio.c (12)
M platforms/unix/vm/sqUnixVMProfile.c (5)
M platforms/win32/vm/sqPlatformSpecific.h (1)
M spur64src/vm/cogit.h (2)
M spur64src/vm/cogitARMv8.c (8)
M spur64src/vm/cogitX64SysV.c (8)
M spur64src/vm/cogitX64WIN64.c (8)
M spur64src/vm/cointerp.c (49)
M spur64src/vm/cointerp.h (4)
M spur64src/vm/cointerpmt.c (31)
M spur64src/vm/cointerpmt.h (3)
M spur64src/vm/gcc3x-cointerp.c (49)
M spur64src/vm/gcc3x-cointerpmt.c (31)
M spurlowcode64src/vm/cogit.h (3)
M spurlowcode64src/vm/cogitARMv8.c (16)
M spurlowcode64src/vm/cogitX64SysV.c (12)
M spurlowcode64src/vm/cogitX64WIN64.c (12)
M spurlowcode64src/vm/cointerp.c (53)
M spurlowcode64src/vm/cointerp.h (5)
M spurlowcode64src/vm/gcc3x-cointerp.c (53)
M spurlowcodesrc/vm/cogit.h (3)
M spurlowcodesrc/vm/cogitARMv5.c (12)
M spurlowcodesrc/vm/cogitIA32.c (12)
M spurlowcodesrc/vm/cogitMIPSEL.c (16)
M spurlowcodesrc/vm/cointerp.c (57)
M spurlowcodesrc/vm/cointerp.h (5)
M spurlowcodesrc/vm/gcc3x-cointerp.c (57)
M spurlowcodestack64src/vm/gcc3x-interp.c (25)
M spurlowcodestack64src/vm/interp.c (25)
M spurlowcodestacksrc/vm/gcc3x-interp.c (25)
M spurlowcodestacksrc/vm/interp.c (25)
M spursista64src/vm/cogit.h (2)
M spursista64src/vm/cogitARMv8.c (12)
M spursista64src/vm/cogitX64SysV.c (8)
M spursista64src/vm/cogitX64WIN64.c (8)
M spursista64src/vm/cointerp.c (49)
M spursista64src/vm/cointerp.h (4)
M spursista64src/vm/gcc3x-cointerp.c (49)
M spursistasrc/vm/cogit.h (2)
M spursistasrc/vm/cogitARMv5.c (8)
M spursistasrc/vm/cogitIA32.c (8)
M spursistasrc/vm/cogitMIPSEL.c (14)
M spursistasrc/vm/cointerp.c (49)
M spursistasrc/vm/cointerp.h (2)
M spursistasrc/vm/gcc3x-cointerp.c (49)
M spursrc/vm/cogit.h (2)
M spursrc/vm/cogitARMv5.c (8)
M spursrc/vm/cogitIA32.c (8)
M spursrc/vm/cogitMIPSEL.c (10)
M spursrc/vm/cointerp.c (57)
M spursrc/vm/cointerp.h (4)
M spursrc/vm/cointerpmt.c (81)
M spursrc/vm/cointerpmt.h (5)
M spursrc/vm/gcc3x-cointerp.c (57)
M spursrc/vm/gcc3x-cointerpmt.c (81)
M spurstack64src/vm/gcc3x-interp.c (25)
M spurstack64src/vm/interp.c (25)
M spurstack64src/vm/validImage.c (17)
M spurstacksrc/vm/gcc3x-interp.c (25)
M spurstacksrc/vm/interp.c (25)
M spurstacksrc/vm/validImage.c (17)
M src/plugins/Squeak3D/Squeak3D.c (8)
M src/vm/cogit.h (2)
M src/vm/cogitARMv5.c (8)
M src/vm/cogitIA32.c (8)
M src/vm/cogitMIPSEL.c (12)
M src/vm/cointerp.c (10)
M src/vm/cointerp.h (2)
M src/vm/gcc3x-cointerp.c (10)
M stacksrc/vm/gcc3x-interp.c (12)
M stacksrc/vm/interp.c (12)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562.patchhttps://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562