~sircmpwn/hare#917: 
Using Hare varargs with an incomplete type segfaults harec

Minimal reproduction:

fn fun(a: T...) void;
export fn main() void = fun();

The issue is in check.c:1479 (and a bit lower for no arguments case), where param->type can be have storage=STORAGE_ERROR if the type is not resolved, but this is not checked and the code assumes that the type is slice and gets a NULL pointer for the member type that is later dereferenced during type lookup.

Status
RESOLVED FIXED
Submitter
~yerinalexey
Assigned to
No-one
Submitted
1 year, 2 months ago
Updated
1 year, 2 months ago
Labels
bug harec

~ecs REPORTED FIXED 1 year, 2 months ago

Alexey Yerin referenced this ticket in commit b256a32.

Register here or Log in to comment, or comment via email.