-
Notifications
You must be signed in to change notification settings - Fork 125
Description
I'm currently working on a VR port of Squeak to the Quest 3 headset, and I've run into an issue that I hope you can help me with.
When certain methods are executed, Squeak throws a Segfault (example below). I believe that this may be an issue with the JIT. Here is what I know:
- My Quest 3 has this issue (Android, Qualcomm Snapdragon XR2, ARMv8). The VM is built with a custom CMake setup.
- My M2 Macbook Pro doesn't have this issue (although I use a VM that is built with the usual build system)
- This issue occurs in a trunk image (Squeak6.1alpha-23565-64bit)
- It does not occur in a release image (Squeak6.0-22148)
- The bytecode is different in each image. The bytecode in the release image is generally longer; we've noticed that the literals in the release image contain numbers, but not in the trunk image.
- cog.spur is affected, stack.spur is not
- The size of the method appears to be important. Shorter methods do not trigger the issue (see example, removing a line fixes the issue)
- Simplifying the method also fixes the issue (in the example, replacing every call to Character with
Character spacewould fix it) - The code in question is not executed; the crash also occurs if the code is wrapped in a block that is not executed (e.g. because of a nil check)
- If the method is called once in a startUp: method, it doesn't crash
- This has been an issue since at least commit 5a6dc2f in August 2025 (I've only noticed recently because I've been working with a release image)
- The crash.dmp file appears to be empty. This may be an issue with the VM setup or environment.
I work with a modified version of the VM (https://github.com/leogeier/opensmalltalk-vm/tree/cmake-for-quest), but I try to keep it relatively up to date and with as few modifications as possible. I do use my own simplified CMake build and load Squeak as a shared library.
I've attached an example method that has the issue and a stack trace. The method itself is a little finicky; if it doesn't crash, it might help to add a few more lines to the dictionary.
Any idea what might be the issue here?
Stack trace:
art_sigsegv_fault 0x0000007eed16fe20
compileCogMethod cogitARMv8.c:33280
cogselector cogitARMv8.c:9864
ceSendsupertonumArgs gcc3x-cointerp.c:13929
interpret gcc3x-cointerp.c:2905
run_squeak sqUnixMain.c:2310
squeak_func(void *) native-lib.cpp:426
main native-lib.cpp:496
android_main rcore_android.c:291
Example method:
'From Squeak6.1alpha of 28 December 2025 [latest update: #23566] on 20 January 2026 at 6:14:20 pm'!
!SRWorld class methodsFor: 'as yet unclassified' stamp: 'lege 1/20/2026 18:13'!
keyDict
^ {
0 -> nil.
39 -> $'.
44 -> $,.
45 -> $-.
46 -> $..
47 -> $/.
48 -> $0.
49 -> $1.
50 -> $2.
51 -> $3.
52 -> $4.
53 -> $5.
54 -> $6.
55 -> $7.
56 -> $8.
57 -> $9.
59 -> $;.
61 -> $=.
65 -> $a.
66 -> $b.
67 -> $c.
68 -> $d.
69 -> $e.
70 -> $f.
71 -> $g.
72 -> $h.
73 -> $i.
74 -> $j.
75 -> $k.
76 -> $l.
77 -> $m.
78 -> $n.
79 -> $o.
80 -> $p.
81 -> $q.
82 -> $r.
83 -> $s.
84 -> $t.
85 -> $u.
86 -> $v.
87 -> $w.
88 -> $x.
89 -> $y.
90 -> $z.
91 -> $[.
92 -> $\.
93 -> $].
96 -> $`.
280 -> nil.
281 -> nil.
282 -> nil.
283 -> nil.
284 -> nil.
290 -> nil.
291 -> nil.
292 -> nil.
293 -> nil.
294 -> nil.
295 -> nil.
296 -> nil.
297 -> nil.
298 -> nil.
299 -> nil.
300 -> nil.
301 -> nil.
340 -> nil.
341 -> nil.
342 -> nil.
343 -> nil.
344 -> nil.
345 -> nil.
346 -> nil.
347 -> nil.
348 -> nil.
320 -> nil.
321 -> nil.
400 -> nil.
32 -> Character space.
256 -> Character escape.
257 -> Character return.
258 -> Character tab.
259 -> Character backspace.
260 -> Character insert.
261 -> Character delete.
262 -> Character arrowRight.
263 -> Character arrowLeft.
264 -> Character arrowDown.
265 -> Character arrowUp.
266 -> Character pageUp.
267 -> Character pageDown.
268 -> Character home.
269 -> Character end.
} as: Dictionary! !(cc @marceltaeumel)