Environment
- OS: Windows 10 64-bit
- Factor Version: Current staging/release
Describe the bug
When trying to deploy a standalone executable on Windows that requires network sockets/SSL (e.g., http.client or io.sockets.secure) or FFI, the Tree Shaker crashes during the deploy process with a kernel:die critical error.
Steps to Reproduce
-
Create a simple vocabulary bug-test with the following code (bug-test.factor):
USING: http.client kernel ;
IN: bug-test
: test-crash ( -- )
"[https://www.google.com](https://www.google.com)" http-get drop ;
MAIN: test-crash
-
Create the following deploy.factor configuration:
USING: tools.deploy.config ;
H{
{ deploy-c-types? t }
{ deploy-console? t }
{ deploy-io 3 }
{ deploy-math? t }
{ deploy-name "bug-test" }
{ deploy-reflection 1 }
{ deploy-threads? t }
{ deploy-ui? f }
{ deploy-word-defs? f }
{ deploy-word-props? f }
}
-
Run "bug-test" deploy in the listener.
Actual Behavior
The deployer crashes. The listener drops into the low-level debugger:
You have triggered a bug in Factor. Please report.
critical_error: The die word was called by the library.: 0
Starting low level debugger...
The process dump shows:
And the Call Stack reveals the crash in the shaker:
executing: kernel:die
...
executing: tools.deploy.shaker:die-with2
executing: tools.deploy.shaker:(deploy)
Expected Behavior
The Tree Shaker should successfully compile the executable and retain the necessary C-types/OpenSSL bindings without crashing the VM. Setting { deploy-word-defs? t } and { deploy-word-props? t } (fat binary) seems to bypass the crash, indicating a flaw in the dead code elimination regarding FFI/SSL on Windows.
Environment
Describe the bug
When trying to deploy a standalone executable on Windows that requires network sockets/SSL (e.g.,
http.clientorio.sockets.secure) or FFI, the Tree Shaker crashes during the deploy process with akernel:diecritical error.Steps to Reproduce
Create a simple vocabulary
bug-testwith the following code (bug-test.factor):Create the following
deploy.factorconfiguration:Run
"bug-test" deployin the listener.Actual Behavior
The deployer crashes. The listener drops into the low-level debugger:
The process dump shows:
And the Call Stack reveals the crash in the shaker:
Expected Behavior
The Tree Shaker should successfully compile the executable and retain the necessary C-types/OpenSSL bindings without crashing the VM. Setting
{ deploy-word-defs? t }and{ deploy-word-props? t }(fat binary) seems to bypass the crash, indicating a flaw in the dead code elimination regarding FFI/SSL on Windows.