I've noticed this happens every so often with CI builds:
Screen-Shot-2023-08-14-at-8.49.07-PM.png
e.g. https://github.com/roc-lang/roc/actions/runs/5861941077/job/15892928701?pr=5747#step:16:93 and https://github.com/roc-lang/roc/actions/runs/5886655295/job/15964848784?pr=5764#step:16:94 are two examples of it happening
I assume this means there's a potential segfault in basic-cli
somewhere
if anyone has time, it would be good to try to reproduce this locally, e.g. run that CI script in a loop with valgrind until it reproduces, and then see what valgrind says about what happened
I can look into it eventually if no one else is available.
I could not reproduce this on my machine but valgrind seems to have found something.
We should record the steps required to fix something like this, starting from the valgrind output. Because I have no idea where to go from here :p
step 0 is --debug --linker=legacy
This looks useful:
==14022== Conditional jump or move depends on uninitialised value(s)
==14022== at 0x1DD5A9: ??? (tutorial.ll:6045)
==14022== by 0x1D974A: Box_unbox_7f7e162ee4345c12acb2c8dddfd129c8c9ef562ecb31841cfff13d4789ffc2 (tutorial.ll:3342)
==14022== by 0x1DAB1D: _transformFileContentForHost_beb22fad19423347b2aa99b33212e862ded3f83df5d6238acb1a6a9ade3e (tutorial.ll:4080)
==14022== by 0x1DABCA: roc__transformFileContentForHost_1_exposed (tutorial.ll:4102)
==14022== by 0x1E062C: host::process_file (lib.rs:303)
==14022== by 0x1DE83D: host::run (lib.rs:145)
==14022== by 0x1DD870: rust_main (lib.rs:79)
==14022== by 0x1DD605: main (in /home/username/gitrepos/roc2/roc/www/generate_tutorial/src/roc-tutorial)
==14022== Uninitialised value was created by a stack allocation
==14022== at 0x1DEBF0: host::process_file (lib.rs:174)
==14022==
==14022== Conditional jump or move depends on uninitialised value(s)
==14022== at 0x1DD247: decrement_refcounted_ptr_8 (tutorial.ll:5767)
==14022== by 0x1DD5DA: ??? (tutorial.ll:6051)
==14022== by 0x1D974A: Box_unbox_7f7e162ee4345c12acb2c8dddfd129c8c9ef562ecb31841cfff13d4789ffc2 (tutorial.ll:3342)
==14022== by 0x1DAB1D: _transformFileContentForHost_beb22fad19423347b2aa99b33212e862ded3f83df5d6238acb1a6a9ade3e (tutorial.ll:4080)
==14022== by 0x1DABCA: roc__transformFileContentForHost_1_exposed (tutorial.ll:4102)
==14022== by 0x1E062C: host::process_file (lib.rs:303)
==14022== by 0x1DE83D: host::run (lib.rs:145)
==14022== by 0x1DD870: rust_main (lib.rs:79)
==14022== by 0x1DD605: main (in /home/username/gitrepos/roc2/roc/www/generate_tutorial/src/roc-tutorial)
==14022== Uninitialised value was created by a stack allocation
==14022== at 0x1DEBF0: host::process_file (lib.rs:174)
Last updated: Jul 06 2025 at 12:14 UTC