Russia (UTC+3)
TODO
yyp
on Libera.Chat and OFTCComment by ~yerinalexey on ~sircmpwn/hare
Oops, turns out you need to pass
SA_SIGINFO
to get a validsiginfo
pointer. The real solution is to warn about this somewhere in the documentation, as well as providingflag::SIGINFO
.
REPORTED
RESOLVED NOT_OUR_BUGbug added by ~yerinalexey on ~sircmpwn/hare
freebsd added by ~yerinalexey on ~sircmpwn/hare
Ticket created by ~yerinalexey on ~sircmpwn/hare
Looks like the second parameter to the signal handler is null.
use unix::signal; use rt; use fmt; fn handle(sig: signal::sig, info: *signal::siginfo, uctx: *opaque) void = { fmt::printfln("signal={} errno={} code={}", signal::signame(sig), rt::strerror(info.errno), info.code: int)!; abort(); }; export fn main() void = { signal::handle(signal::sig::FPE, &handle); fmt::println(1 / 0)!; };Process 988 stopped * thread 1, name = 'b', stop reason = signal SIGFPE: integer divide by zero frame 0: 0x00000000080181c2 b`main at sigtest.ha:15 12 export fn main() void = { 13 signal::handle(signal::sig::FPE, &handle); 14 -> 15 fmt::println(1 / 0)!; 16 }; Process 988 resuming Process 988 stopped * thread 1, name = 'b', stop reason = signal SIGSEGV: invalid address (fault address: 0x6) frame 0: 0x00000000080182ca b`handle at sigtest.ha:7 4 5 fn handle(sig: signal::sig, info: *signal::siginfo, uctx: *opaque) void = { 6 fmt::printfln("signal={} errno={} code={}", -> 7 signal::signame(sig), rt::strerror(info.errno), 8 info.code: int)!; 9 abort(); 10 };
Comment by ~yerinalexey on ~sircmpwn/hare
Sebastian referenced this ticket in commit 8ec5041.
Ticket created by ~yerinalexey on ~sircmpwn/hare
type some_func = fn() void; type t = (*some_func | int); export fn main() void = { func(&empty); }; fn func(v: t) void = void; fn empty() void = void;This currently fails with
Argument type *fn() void is not assignable to parameter type t
. Works fine if the pointer is moved into the alias, or if&empty
is explicitly cast to*some_func
.Might be related to type hints somehow.
Relevant commits:
f2723ad7
- Make pointer/slice assignability rules more strict
Comment by ~yerinalexey on ~sircmpwn/hare
Bor Grošelj Simić referenced this ticket in commit f4ab18a.
Ticket created by ~yerinalexey on ~sircmpwn/himitsu
Example:
$ nc -U $XDG_RUNTIME_DIR/himitsu query -y proto=irc
The same problem occurs with
-h
flag.We should probably either not use getopt in this case, or add an alternative getopt that reports an error instead of exiting.
Comment by ~yerinalexey on ~sircmpwn/hare
This should be fixed in the latest QBE version: https://c9x.me/git/qbe.git/commit/?id=1162359a198ab6a18a734cb9f7955d0b28e342b6
Comment by ~yerinalexey on ~sircmpwn/hare
math::hypotf64
seems to be causing it. IL source: https://paste.sr.ht/~yerinalexey/884434fae1a12db5917ca591343ae2df5dcb22c1