search for: dest_space_left

Displaying 4 results from an estimated 4 matches for "dest_space_left".

2017 Sep 16
2
assertion triggered since update to llvm 5
...Here's the smallest zig test case to cause the problem: export fn entry() { var bytes: []const u8 = "format"; write(bytes); } pub fn write(bytes: []const u8) { var index: usize = 0; var src_index: usize = 0; while (src_index < bytes.len) { const dest_space_left = 1 - index; const b = bytes.len - src_index; const copy_amt = if (dest_space_left < b) dest_space_left else b; index += copy_amt; src_index += copy_amt; } } pub fn panic(msg: []const u8) -> noreturn { while (true) {} } compile with ./zig build_obj test....
2017 Sep 17
2
assertion triggered since update to llvm 5
...var bytes: []const u8 = "format"; >> write(bytes); >> } >> >> pub fn write(bytes: []const u8) { >> var index: usize = 0; >> >> var src_index: usize = 0; >> >> while (src_index < bytes.len) { >> const dest_space_left = 1 - index; >> const b = bytes.len - src_index; >> const copy_amt = if (dest_space_left < b) dest_space_left else b; >> index += copy_amt; >> src_index += copy_amt; >> } >> } >> >> pub fn panic(msg: []const u8)...
2017 Sep 17
4
assertion triggered since update to llvm 5
...; >>>> } >>>> >>>> pub fn write(bytes: []const u8) { >>>> var index: usize = 0; >>>> >>>> var src_index: usize = 0; >>>> >>>> while (src_index < bytes.len) { >>>> const dest_space_left = 1 - index; >>>> const b = bytes.len - src_index; >>>> const copy_amt = if (dest_space_left < b) dest_space_left else >>>> b; >>>> index += copy_amt; >>>> src_index += copy_amt; >>>> } &g...
2017 Sep 17
2
assertion triggered since update to llvm 5
...;>> >>>>> pub fn write(bytes: []const u8) { >>>>> var index: usize = 0; >>>>> >>>>> var src_index: usize = 0; >>>>> >>>>> while (src_index < bytes.len) { >>>>> const dest_space_left = 1 - index; >>>>> const b = bytes.len - src_index; >>>>> const copy_amt = if (dest_space_left < b) dest_space_left else >>>>> b; >>>>> index += copy_amt; >>>>> src_index += copy_amt; >&...