[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554)

Christoph Thiede notifications at github.com
Mon Mar 22 12:24:46 UTC 2021


Sorry for the late reply. I'm not yet very familiar with building the VM and did not debug it before at all 😅

As far as I can tell, everything looks fine when `LoadLibrary()` is called (I debugged `build.win64x64/squeak.cog.spur/builddbg`):

![image](https://user-images.githubusercontent.com/38782922/111986111-d045c080-8b0d-11eb-83ab-6f7303b88a34.png)

![image](https://user-images.githubusercontent.com/38782922/111989144-aabab600-8b11-11eb-91a4-684807b78944.png)

Still, these calls raise an access violation. The other attempts with `32`/`.dll` postfixes and image path prefix fail, too. As far as I understand it, the screenshotted call should succeed because the `Win32OSProcessPlugin.dll` is in the same directory as `Squeak.exe`.

Does it matter that according to the Process Explorer, the current working directory of Squeak.exe points to the location of the image file rather than to the location of the VM? According to the [docs](https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order#standard-search-order-for-desktop-applications), this should not matter?

By the way, the SSL plugin can be successfully loaded when running the same image in WSL (Ubuntu). So it's indeed a VM problem.

---

BTW: When trying to run a 64-bit image in a 32-bit VM (which does not work, of course), an exception is generated from the following stack:

```
Squeak.exe!abortMessage(char * fmt) Line 63
Squeak.exe!printUsage(int level) Line 3116
Squeak.exe!sqMain(int argc, char * * argv) Line 1636
Squeak.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 1779
Squeak.exe!main(int flags, char * * cmdline, char * * inst) Line 20
Squeak.exe!__tmainCRTStartup() Line 341
```

Shouldn't a meaningful error window be shown here instead? Do you have any idea why this is broken? I also noticed that the `args` variable seems to be corrupted. Or is it just pending to be initialized properly?

![image](https://user-images.githubusercontent.com/38782922/111917579-ff622080-8a80-11eb-9a79-fb17086f8c08.png)


-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-804022442
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210322/284b7546/attachment-0001.html>


More information about the Vm-dev mailing list