Menu

#2084 Queuing the same `CALL ON` condition name twice in one clause segfaults when the boundary drains the second copy

5.3.0
open
nobody
None
none
5
2026-08-22
2026-08-22
No
call on user c1 name h1
zr = ra() + ra()
say 'after' zr
exit 0
ra:
raise user c1 return 1
h1:
say 'h1' sigl
return

ra raises the trapped condition once per call and the clause calls it twice, so both are queued
before the clause reaches its boundary. The interpreter prints h1 2 on stdout -- the first delivery,
which completes normally -- and then dies with SIGSEGV, rc 139. So what fails is the boundary reaching
the second copy of an already-delivered condition name, not the queuing of it.

The neighbouring shapes are clean and bound the defect to the repeated name. The same clause with
two differently named conditions answers correctly: zr = ra() + rb() prints h1 3, h2 3, then
after 3, both handlers reporting the raising clause's own line, and a three-name version delivers
all three in the order queued. Draining a boundary in queue order therefore works; only a repeated
name in one boundary fails.

Found while establishing what a clause boundary does with more than one pending condition. No crash
site was captured for this one; a maintainer reproducing it under a debugger would add that.

Discussion

Anonymous
Anonymous

Add attachments
Cancel