Skip to content

Added WebSockets support to Vere#4

Merged
bonbud-macryg merged 5 commits into
gw/next/kelvin/408from
gw/websockets
Mar 11, 2026
Merged

Added WebSockets support to Vere#4
bonbud-macryg merged 5 commits into
gw/next/kelvin/408from
gw/websockets

Conversation

@polwex
Copy link
Copy Markdown
Collaborator

@polwex polwex commented Mar 4, 2026

Manual merge of edits in gwbtc/ursockets/vere to last groundwire vere.

@bonbud-macryg bonbud-macryg merged commit f715146 into gw/next/kelvin/408 Mar 11, 2026
1 of 2 checks passed
tinnus-napbus pushed a commit that referenced this pull request Mar 11, 2026
On develop, if a malformed scry URL is queried, we get a leak that ASAN
can detect. For example, after hitting F5 ten times at
`http://localhost:8080/_~_/=` and then pressing ctrl-D:

```
Direct leak of 240 byte(s) in 10 object(s) allocated from:
    #0 0x798dcccf6cbf in malloc (/usr/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.so+0xf6cbf) (BuildId: 4cd39e6608b20f2f5a148a941cd434e0cadcd3dc)
    #1 0x1cd2706 in _http_req_dispatch /home/kirill/work/urbit-repos/vere/pkg/vere/io/http.c:983:29
    #2 0x1cd0dc6 in _http_rec_accept /home/kirill/work/urbit-repos/vere/pkg/vere/io/http.c:1676:7
    #3 0x1ce0378 in call_handlers /home/kirill/.cache/zig/p/N-V-__8AAJ2XqALM9jST2Gu4TIdjPNY2QB8rnmKeepeqr076/lib/core/request.c:155:13
    #4 0x1ea55ca in handle_incoming_request /home/kirill/.cache/zig/p/N-V-__8AAJ2XqALM9jST2Gu4TIdjPNY2QB8rnmKeepeqr076/lib/http1.c:470:13
    #5 0x1bdd68e in uv__read /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/stream.c:1148:7
    #6 0x1bdb3b7 in uv__stream_io /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/stream.c:1208:5
    #7 0x1bcfc3c in uv__io_poll /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/linux.c:1565:11
    #8 0x1bca927 in uv_run /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/core.c:460:5
    #9 0x1bbe425 in u3_king_commence /home/kirill/work/urbit-repos/vere/pkg/vere/king.c:1061:3
    #10 0x1323f4e in main /home/kirill/work/urbit-repos/vere/pkg/vere/main.c:3320:5
    #11 0x798dcc829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
```

This PR factors out scry-over-HTTP handling into a separate function
`_http_peek_dispatch` with semitransfer semantics for `req_u->peq_u` and
the contained noun.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants