zigtools / zls

A Zig language server supporting Zig developers with features like autocomplete and goto definition
MIT License
2.84k stars 286 forks source link

Integer overflow while constructing document scope #836

Closed SuperAuguste closed 1 year ago

SuperAuguste commented 1 year ago

Zig Version

0.11.0-dev.782+0b4461d97

Zig Language Server Version

0.11.0-dev.72+3526f5f

Steps to Reproduce

Open the following file:

union { a: u8, b: void, a: u32,
    /// The result = .valid },
        .name = "atmega3290a = CpuModel{
            .SUCCESS => return error.FastOpenAlreadyInProgress,
    prefer_vmovsr)] = .{
            0x74, 0x63, 0x77, 0xb5, 0x28, 0x80, 0x5f, 0x48, 0x9c, 0x9d, 0xa2, 0xb7, 0x79, 0x37, 0x0, (~arg1), 0x1);
           pub const RTL_OSVERSIONINFOW = OSVERSION = 27;
    pub const NONE: ULONG = 0xa000;
    pub const WeakPair = weakHashLen32WithSeed, .{ v, default log level in full-screen mode.
    Invalid for this.
         r.normalize(if (a.positive, r required = true;
                  timer_settime = 263,
    writeIntLittle(u16, 0x7C01);
pub const IPX_RECEIVE_BUFFER, @alignCast(16, dk[i * 128 * params.t, memory.
/// Adds specified in Reverse Polish Notation self-hosted compiler
    ST9PLUS = 67,
    /// Double-base multiple I/O requested operation is implementation.
///
/// This ANY const iTs = [_]type{};
              '/' => return r;
}
// Actual behavior_t = 5;
pub const seek_back = offset, &nread)) {
                    try expectEqualStrings(files);
           .dependencies = featureSet(&[_]Feature{
                      );
         .arm, .armeb,
          }
    if (stderr) catch |err| {
             fn assertEqual("14DA9BB7120BF58B985A8E00FDEBA15B", &tag);
}
test "zig fmt: infix operator" {
        const f32_true_min: comptime ElementType,
          .dependencies = featureSet(&[_]Feature{}),
    };
             deadline.wait(&sem.mutex);
              return ret;
                    else => return error.SkipZigTest,
         FILE_READ_ATTRIBUTE_READONLY = 0x00000300; //    8 bits
pub const none_free: u8 = 0,
         .{ .s = "-1ms", .d = std.valgrind/callgrindClientRequestPort or Exception, in the Page RVA field is set are
    DOM = 33,
    /// [1, 2, 3],
         .mmx,
            usage();
        9, // 6
         \\\\    switch (p.token_tags[template template = data.lhs != 0)
                _ = try file.stat();
          fiat.opp(&v_opp, v);
    defer q.deinit();
            while (true) {
                           "2001:db8::",
             q = q.sub(pc2[@intCast(u32, m), .p = 1 })
pub const feature of the same node again and make sure waits compressed_0.len);
          const high = @intToPtr(*anyopaque, ptr),
    };
           .spirv32, .spirv64 => true,
        error.NameTooLong, reader.reader();
           std.debug.panic("unhandled here so the client.connect(self: CrossTarget) bool {
        return SignedType) >= integer to a socket,  pipe,  or
/// simply adds
    // Gimli-Cipher then hash.
    pub const V4MAPPED);
    pub fn writeByte(' ');
          };
         .Float => {

          }
    return t1.mul(Z3);
    var o = offset, native_arch.isSPARC())) {
             .keyword_extern => "extern",
          if (ix < 0x7f800000) {
                     try writer.print("(memory version="1.0" encoding and dumped as well as all
                state.sboxes[0][@truncate(u8, j)];
    return id == @typeInfo(T)) {
                .Min => std.io.getStdErr().writer().writeAll("\\\\\\\\"),
             .rhs = span.start,
        Sha512.init(.{});
        .dependencies = featureSet(&[_]Feature{}),
    };
    result.target.os.tag == .windows.WPARAM;
const io = std.crypto;
const aes_gcm = struct {
        if (cqe_send.err() == .INVAL) return asm volatile / KEYWORD_enum (LPAREN (MINUSRARROW TypeExpr(p: *Parser) !SmallSpan {
            \\\\
        \\\\    return Stat{
                 var st = Hash.init(0);
        .DESTADDRREQ = 39,
    /// Options) File.OpenError!fd_t {
            .timetypes) |T| {
             bar: u32 =
         const VM = 2;
        }),
    };
    }
          .INVAL => unreachable;
        thread1.join();
                 SIGPARM = B_POSIX_ERROR_BASE + 44,
         @ptrToInt(stat_buf));
    }
}
/// Uses a spinlock to yield expectedError;
    pub fn defineCMacro(self: *const fn (protocol (ICMP) hop limit exceed an inconstancy was detected an invalid state after if, for, while we still need to channels.len != 0 and iy < 0x7ff00000) {
                   .code = @intToPtr(fn (sig: u32) c_long, 57);
pub const LNEXT = 15;
    pub fn main() has returned.
/// If no size hint is within the symbols = try allocator, 0xffffffff);
        } else |err| if ((flags & os.linux.tls.tls_image.alloc_stack.push(node);
    }
}
test "c_allocator.alloc(u32, 16, 32, 64, 128, 256 };
    pub const CHR = 2;
        [arg1] "{o0}" (arg1),
    slab("70772667115549675", 72),
               }
          for (data) |elem, i| {
                   std.fmt.allocPrintZ(self.fd, sub_path_w)),
         .{ "fn", .keyword_atomics,
    packet_data: [MAX_NAME_BYTES = 12;
    pub const spin_unlock,
                        switch (c) {
             .tokens = &[_]Reference occurs when this list have to leave a trust secret.len - 1;
    pub fn update(data);
                nosuspend in_stream.writeByte(',');
                 }
          return windows.LPTHREAD_MUTEX_T = switch (getErrno(res)) {
               Insn.ret(.{ .k = 35 }),
    };
          return self._query_module = 128,
    debug.assert;
const fd = @intToPtr(?Sigaction = union {
             .high_registered.
              }
         switch (builtin.valgrind.doClientRequestStmt(.DumpStats = valgrind.zig");
    pub fn fmtSliceHexLower;
    if (rc == -1) {

           }),
    };
        self.os_version instructions",
             .NOTCAPABLE => return self.isSplitByte(self.bytes[mark..self.index += inner.items[dirname.len] = 0;
    while (i > 0) {
              .dependencies = featureSet(&[_]Feature{}),
    };
    result[@enumToInt(Feature.SPV_EXT_fragmentation server session key was not attached to start. Contact your support personnel.
    /// string `target_path, self.fn_args = try allocation in the operation facility 2 is installation under `std.os.linux.EPOLL.OUT | linux.CLONE.CHILD_CLEARTICS = 0x02;
pub const first_32_bits = @bitSizeOf(T) >= @bitSizeOf(u4);
                     const os.ucontext_hash: u32,
    major_linker_version of parameter was passed in nanoseconds
pub const P256 = struct a float exp
                .SUCCESS => {},
        .bits = Self.Indexer;
              Sha256.hash("a") == 0x811c9dc5);
pub const y = z.im;
               error.Locked = 0b00;
    pub const addr = (base + ph.p_offsets: [wb]Block align(1),
        return FileSource{ .buffer_size, A.start + pull[pull_index].from < pull[0].range.end), context " ++ @typeName(Context) {
        CPU = 0,
        => {
                return error.SystemResource mode set.
        self.initialize, or else
//!          self.chmod(permissions for hashing it for notified=true.
                  /// Invalid Current moment the value `expect`.
/// Precondition,
    // See https://code.woboq.org/linux/linux/kernel/defining-i-o-control-codes
pub const TBM_GETTHUMB = 1 << 0;
    inline while (it.next());
        const read_value1 == @bitCast(usize, target_user_data = [1]i32{0} ** SIG.WORDS]u32,
};
fn testRandomError = os.RR.A },
    );
}
test "big.int div multi-multi unsigned enum values.
               .lhs = try file.readAllArrayList(IterableDir(self: *Self, allocator = &[_]u8{ 0x00, 0x80, 0x81, 0xec, 0x10, 0x32,       0,
            }
           \\\\
                di.endian);
}
/// Set a socket.
             out.print("  count: integer, float, other_base };
            sub_chunks.append("--");
    try expect(minInt(i64) == true,
         }
    }
};
pub const open_reparse_point: u32,
           [bit] "X" (@as(T, 0.0)));
    var x52: u1 = undefined;
                 fn expectStatements = 141,
    _neighbors(self, reset_flag, new);
    }
    if (fields) |field, i| switch (builtin.os.tag == .windows.HEAP_NO_SERIALIZE else 0;
    pub const LSP_OUTBOUND_MODIFY = 16384;
    const x52 = (x44 >> 8));
    var footer: ?[]u8 = null;
          mac.update(z);
        experimental_zvfh,
    zfhmin,
        try testing section_64) []const u8,
    ) @TypeOf(reader)) {
            break :@"void";
    const first = new_index],
         const str = "$argon2id,
         _ = try hexToBytes(&out, expected,
                           const msghdr = extern struct {
                data,
          return renderAsm(
        gpa: Allocator.free(PATHEXT);
    try svt.skipUntilDelimiterOrEof returns the result fits into mask in this bit sets.  A bit sets. Bits in this call.
pub const CONTEXT = 0x0465;
pub const CS_SIGNER_TYPE_MAC_APP_STORE: u32 = 0;
    while (pos < list.len == 0) null else {};
                   ) == 0)
                    }
        tmp1[2] = addMulLimbWithCarry(a: Limb, c: Limb = undefined;
    var buffer: u7,
        .Internal = 0,
         const lbrace = code | src_type,
    comptime mem.eql(u8, tagName(abi),
            return syscalls.
    SERVER_DISABLE_ASLR = 0x010D;
pub const c = d[0..{
             // For allocator, @alignOf(IndexHeader.allocator) catch unreachable = high_bit | 2,
    /// A version: ULONG,
};
pub usingnamespace @import("protocol: *align(8) = Guid{
        .thumb_mode,
        prev_column = 0;
    var x180: u64 = undefined;
    addcarryxU64(&x20, x18, x7, 0xffffffffffff000000000001;
pub const MEM_RESERVED_INVALID_ENTRY = 1751,
    0x32,       0xb584c6a7fd8709fe,
                        .image_insts,
          if (!mem.eql(u8, tagName(token.tag), self.min.order(ver) == .lt);
    var x34: u64 = undefined, [_]i32{
        0, 0, 0, 0, 0, 0, 0,
    eflags: i32,
};
pub const StringifyOptions{},
          /// Compare leading is indexes[slot].entry_index = std.os.windows) {
               return error.MissingDebugInfo;
         .result = if (native_os == .wasi and !builtin.StackTrace(ret_addr_start + amount, B.end),
    };
    pub const B200 = 200;
    pub const UNTRACED;
    /// This server. Re-enable events in msg_iov: [*]iovec,
    iovlen: i32,
    TVOS = 0x2,
               if (builtin.os.tag == .linux => {
            try testBasenameWindowsImpl
else if (e >= 0x3F800000 + (((c0 & 0x03ff));
         }
                contiki,
             try roundTrip(
            \\\\                 /// Other x86 and x86_64 macOS build artifacts to prevent service call.
    PRINTER_NOT_SHAREABLE = 13,
    _,
};
pub const EFL = 16;
    pub const B2400 = 0o0010;
            var x156: u64 = undefined;
           var numbers convert the end-of-stream JSON parser and overwritten.
    SEND = 0,
         .movdiri,
               try testing.tmpDir(.{});
    try testCanonicalized value for a password: []const Limb) void {
               return unexpected,
              first: VectorIndex(@TypeOf(promoteIntLittle(u16, utf16le_as_bytes[0..n]);
    const salt = "NaCl trap",
          var x27: u64 = undefined;
    addcarryxU64(&x4, &x5, 0x0, x134, x131);
    try testRandomEnumValue();
}
test "std.atomic.Atomic(usize, limb_size + 1;
    test_protocols/edid_discovered,
/// so the cache lines
        while (i < 10) : (i += 1) {
             return error.AccessDenied,
                   max = mid;
    }
    pub const global_eventfd_node.* = std.atomic.Stack(ResumeNode.EventFd).Node, "data") == 16);
    /// A process_stack,
          /// Create a Signer, that can be freed pointers point to a 64-bit DSP ProcessFdQuotaExceeded,
           .dot6_insts,
           }
           fn round(d: *Self, str: []const u8, expected_hash = "b9395f37c131cd403a327ccf82ec016a" },
                         }),
    };
         [arg1] "{rdi}" (arg5),
    slab("23707742595255608", 303),
          }
          try testing.expect(ilogbX(f128, -123984) == 16);
                .containerMembers();
                  pub const CBEM_GETITEMW = 0x1053;
pub const APPEND = 0x0080;
                      if (x) {
            .riscv32 => .UnknownCpuFeature.nopl)] = .{

         },
              remap_file_path);
    std.debug.assert(2 == @offsetOf(Controller of the next_mmap_addr_hint), &std.heap.ArenaAllocator, fail_index < newIndex = 0;
        }
         mem.set(u8, buffer: *[MAX_PATH_BYTES]u8 = undefined;
    var at_hwcap = auxv[i].a_type != elf.PT_PHDR) {

              }
    for (dst) |got, i| {
            .alg_id = "bcrypt codec" {
        if (get_or_put.value_ptr.getStackTrace(0, @intCast(u32, timeout operation of argv and env vars here.
    DEBUGGER_ENABLE_DENY_ONLY = (0x04000000;
pub extern struct {
        assert(self.state = .String = .{
                self.user_input_options.directEnumArrayDefault(comptime builtin = @import("complex/ccoshf.c
// https://github.com/ziglang/zig/issues/12783
    pub fn getKeyPtrAdapted(key, ctx, undefined;
    var x50: u64 = undefined;
    addcarryxU64(&x15, &x16, x14, x11);
             const h = checksum error returns ENOSPC if data_out. return Instant.now() catch |err| switch (builtin.mode == .Debug);
        : "memory", "cc"
    );
}
test "big.int neg string float math
    pub const WM_COMMAND = 0x048C;
pub const WM_CLOSE = 0x04;
    pub fn isSet(self: Impl) void {
               else => {
                  \\\\}
           .time_mid = 0x6459,
    /// The system administrator immediately after this works when determine whether the pairs in the remains `null` if empty.
pub const Atomic(u32).init(maxnum, maxnum);
              0x30,       0x31,       0x2d04f14348a4c5dc,
    0x503ca9bade45b94a,
         .description = "Enable AVX-512 further discussion   of
            .rhs = 0,
         .llvm_name = "arm10e",
        return error.SymLinkLoop,
    zig_args.appendSlice` except `pathname`
          A.start, A.start, A.start;
                  buffers.len, b.limbs.len + 1) : (i += 1) {
                  X16: DWORD64,
    swap(T, sliced_items, context, lessThan(i8, -0x80, -1) == -1);
    out1[5] = x24;
}
/// Return the slice of out_buffer[0..out_len]u8 = undefined;
    addcarryxU64(&x69, &x70, x1, (arg1[2]));
    try expect(mem.eql(u8, buf[0..amt], "header1\
";
    const x3 = (arg1[15])) << 48);
    var x157: u64 = undefined;
    var x54: u1 = undefined;
    var arena_allocator.alloc(u8, mods, "87000000000000000000000000000000000000000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551);
    try testing.expect(':' == toUpper('\\xab'));
    const p = "password-based key derivation completion = std.unicode.utf8ValidCodepoints
    var x149: u1 = undefined;
    var x2: u64 = undefined;
    var x377: u64 = 0,
    /// The operations used in tools/zig-gdb.py to fetch an exception_behavior == .UseFirst = union(@"EnumUnesc = enum {
                 .max_exponent
//
// MMM.NNN is stored to allow running => {
            indexes[slot] = .{
             return syscall3(.poll, @ptrToInt(&struct_field.field_type, other: Self) i128 {
              @memset(ptr + @sizeOf(natural_t);
pub const FILE_INTERNAL_DEF = 5,
    /// The integer.
pub const fields with variable
    NOLCK = 77, // No medium changer contains(entries: u13, p: *linux.io_uring_params.field_order);
    try testBasenameWindows(path: []T) RemoveDirStep, "step", step);
    if (key_len :0].ptr, flags);
}
/// Same as `createFile(filename);
            }
            },
    Hash{
             c2,
    /// and execve(),
           .flags = 0,
            .ObjectStep, "step", step);
        state = .failed;
    subborrowxU64(&x163, &x164, x156, x153);
            .features = featureSet(&[_]Feature{}),
             try expectEqual(str[str.len], 0);
        .@"7e10",
             .avr51,
    sem.wait();
    continue,
        os.AF.INET6,
              input to be supplied UTF-8 string.
         };
           return p.addNode(.{
             '0' => {
                    var x218: u64 = undefined;
    var x127: u64 = 9390964836247533;
    pub const barcelona",
               state: State,
    high -= 1;
    while (i < packed_array);
    const token_tags[main_token)[block_node = extra.section_contrib.SectionContribEntry,
    DiskQuota,
    Comma,
                       try testing.expect((try a.to(SignedDoubleLimb)) == maxInt(usize)) {
            .sh_flags: i32,
    src_digit = c - 'a' + 10,
          return error.SkipZigTest;
    var x74: u1 = undefined;
    var cur = s.cur + n;
                  // Users should still believed to have a trailing,
          const rc = os.system.NOTE_TRIGGER;
    pub const NEON = 1 << 10;
    out2[5] = x165;
    out1[2] = x162;
         }
    }
    if (exe.vcpkg_bin_path) |p|
        .llvm_name = "atmega8535",
          pub const GLOBAL = 0x1025;
};
pub const Poly1305 secretbox contains all zeroes to round to beginning of the same as that of the range set.
           const utf16le[0..], in[0..], key[0..16]);
         .weak = false,
               try expect(ldexp(EightTimesTrueMin = @bitSizeOf(usize) - 4;
const Reference_bits_multiple blocks, params.digest_length) : (i += 1) {
             .sentinel) |sentinel, expect: u32, length);
           \\\\        } else {
                     const path for the parameters for multiple of 1024 and 2048" {
        var a = try Managed.init(testing.expect(eql(u8, it.next().?, std.unicode.utf8ToUtf16LeStringLiteral(dst, token_index = customer indexes.  I must match_before = p.source[start..end];
}
test "ComptimeFloat => return p.addNode(.{
                    .seg_32bit: u1,
    umount = Linux + 411,
    OVERFLOW = 0x000010000000000000000000);
    defer std.testing.allocator.init(self: IPv4) bool {
        var x196: u1 = undefined;
    var x115: u64 = undefined;
    mulxU64(&x224, &x225, x223, x207, x199, 0xfffffffffff);
    var file = ds.offset, shdr.sh_offset, &sbytes, from_bytes_copied == 0) {
                ais.popIndent();
    var x109: u64 = undefined;
    mulxU64(&x171, &x172, x190);
    r.s[1] = 0;
              field: Field) []const T) void {
        var ctx = Prf.init(page_allocator);
            self.* = undefined;
    var x11: u64 = undefined;
    var enc = try testing.expectEqual(@as(i32, buffer);
         div(q, r, &x, &y);
             0x4baa32ac316fb3ab,
           return err,
    };
        state[4 + column] = ((x ^ (z << 1)) ^ ((y & z) << 2));
          /// Handle all flag combinations
// where under `std.x.net.ip;
    while (i < entries == 0 or self.openDirFlagsZ(sub_path);
         var x135: u64 = undefined;
    var buf = ArrayList(i8).initCapacityAdapted(self: Self) void {
        @setRuntimeSafety(false);
              .generate
/// add end_block_or_assignment) |a| ([:s]align(a) T, ptr)[0..self.len;
         .name = "exynos_m3",
         _ = U.type;
            while (try walker.deinit();
    var x158: u64 = undefined;
    var aligned_mem_16,
              return result;
          });
}
test "y_array_arraysWithSpaces" {
        const nonce_length]u8, key: *const BufSet = struct {
        /// Initialized. Transaction of a logon failed with CONFIG_KSM.
    // A fits inside the default.
    // Timeout, null));
    try p.warn(.expected_return = 119,
    0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
    27, 27,
    i16x8_extend_low_i8x16_u = 0x93,
    /// Have close the standard/default parameter, which is used by the system does not have already present for the null terminated process.EnvMap;
const assert = std.debug.assert(19 == @sizeOf(usize) == 4) return .{ .context " ++ @typeName(Context) != 0)
             break;
                .tv_nsec = @intCast(isize, fd)),
              .name = "atmega2561 = CpuModel{

                  }
        .array_init.ast.elements == 0);
    var x255: u1 = undefined;
    var num_bytes);
             return windows.FILE_NOTIFY);
pub const REALTIME = 256;
          \\\\};
            } else {
            ),
                \\\\    if (items.len;
    writer: anytype,
          writer: anytype) ?K {
              escape_codes,
              t = -t / (t + 2);
    try testCanonical(
               try testing.expect(cqe.flags | w.FILE_OVERWRITE_IF)
             try testing.expectEqual(@as(u32, 1));
    var in_stream.writeAll(".");
            .llvm_name = null,
omit_frame_pointer_to_linenumber,address
    INPROGRESS = 0xC01E035A,
    /// The corresponding POSIX limit is where the WRITER flag was set to zero.");
            if (it.index];
          .llvm_name = "message-security operating system call.
             .macho => try nosuspend = 107,
    size: u32,
};
pub const CREATE_ALWAYS = 0x00E1;
pub const IORING_SETUP_ATTACH_WQ = 1 << 9;
    pub const TU = union(Subtype) {
             // if it was the end.
    NOTBLK = 15,
    // TODO: use @declareSideEffect() when it is
/// not hold the requested eventfd = 323,
    MFILE = -12;
/// Takes a Slice of a key.  Their context " ++ @typeName(SourceType)) {
                return p.dbl();
                if (native_os = builtin.os.tag != .linux) return error.SkipZigTest,
               .@"3e3r3",
                   }
    break :blk result;
        }
        .avr3,
           .SUCCESS);
        try testing.expect(full.unionWith(red).eql(full));
    assert(new_len);
             }
                  .features = featureSet(&[_]Feature{
             result[@enumToInt(Feature.UniformTexelBufferArrayNonUniformShuffle)] = .{
            .{ .dist = 0, .e = 0 };
}
fn ChaChaVecImpl else SalsaNonVecImpl(rounds) : (i += 4) {
              );
    try expect(it.next(), gen.next();
}
pub fn lseek_CUR(self.handle, new_mode: Mode,
) KdfError!void {
        var split every other float = floatMax(f32), expected_path));
    try writeFixingWhitespace(i)) try std.testing.expect(math.approxEqAbs(f32, c.im, 0.533999, epsilon));
    var initialize added to the task.
    IPSEC_AUTH_FIREWALL_FAILED_SECTOR = 1;
pub const ARGUS = 13;
    pub fn formatBuf(value, including its default to two GOT entries) : (i += 1) {
                     const bit = @intCast(i1, @as(usize, @as(isize, dirfd)), @ptrToInt(buffer[0..16], out[0..]);
           defer allocator = self.pathJoin(
            return @typeInfo(T)) {
                  .negative_to_unsigned_0);
        }
              \\\\
                    const path = "test";
    const rusage = extern struct {
        pub const CUR = 1;
        self.metadata is incomplete_false" {
        var i = 0;
          const size = math.min(p2.len, limbs_buffer: [*]const u8{ base_path, mode);
              a: u1,
        const write_size,
    hwmult32,
                    /// The context: @TypeOf(a))) {
            .v6,
          const z00 = xy000;
    pub const ODIA = 0x02;
    pub fn skipChars2('0', '_');
    try a.setRatio(78923, 23341);
    try bit_stream.reader());
    try err(
            if (ptr.size == .Many;
    }
    const token_tags[first_path, sym_link_path: []const u8, options);
         .compound,
        r.len = 1, .bit_count / elapsed_s);
    if (actual != expected_count, @intCast(gid_t, syscalls.
pub const dyld_info_list_len: usize, value: *itimerspec, old_value: *const Montgomery(out1: *[5]u64) void {
                     null,
    rbx: u64,
    blockA.end) : (i += 1) {
            );
           try self.get_sqe();
                      .ACCES => return @bitCast(usize, cqe.res)];
    }
};
/// Test if shiftoffsets = di.coff.getSectionHeaderIteratorPosix = struct {
               q = q.sub(pc1[@intCast(usize, i + 1));
        .description = "Assume that extern_export_fns) |dll_export,
         }
          X3 = X3.add(Z3);
                          const end_offset;
            array_init_one,
                     }
    if (!std.mem.bytesToValue(u32, di + self.stdout_behavior_t,
    inotify_add_watch = 276,
         /// Baseline parameters that while the Volume Shadow Copy Services environmentVariable(self: *ElfDynLib, comptime_float)] = .{
              return error.MissingDebugInfo;
}
fn format(value: RefType) u8 {
        return Curve25519.rejectNonCanonicalError || WeakPublicKeyError = errors ++ lazy.deep_prefix ++ "Second parameter is used by Homebrew/brew/blob/e119bdc571dcb000305411bc1e26678b132afb98/Library/CoreServices = extern struct {
        pub fn reclen(self: *Self, bytes: []const u8) ExecvError {
             var x24: u64 = undefined;
    subborrowxU64(&x171, &x172, x190);
    try expect(1 == bufmap.put(i, i * 10);
    const agg_8_threshold or @fabs(y));
    try testing.expect(math.approxEqAbs(f64, expm1_32(-math.inf(f32)) == 36);
    try argv_list = windows.DWORD;
const htest = @import("builtin");
const ParseFloat(T, "inF"), std.mem.sliceToPrefixedFileW(target_path_w = try windows.IO_STATUS_BLOCK = undefined;
         /// Inserts a new items. **Does not match the file. `0` means `error.StreamTooLong, error.Unsupported,
          .fast_scalar_fsqrt,
                  expandStackSize(self: *LibExeObjStep, name_and_value looks like glibc[2].
//!
//!  * It's OK for the entire local modes
    pub const TTOU = 22;
    pub fn resolve() is not part of global user account.
    inv_round_keys = ctx.key_scheduler = 157,
    0x0e204273b18918b1,
          .@"3e3r2",
              /// Asserts that these head and write permissionDenied,
        \\\\
        .features = featureSet(&[_]Feature{}),
    };
}
fn SliceDiffer(T){
              var x233: u64 = undefined` values.len >= 128) {
                      Z3 = Z3.add(t0);
    try expectEqual(@as(?[:0]u16, lpStartupInfo: *STARTUPINFOW,
    lpCompletionPorts(
        allocator) void {

              }),
    };
    pub const a = [2][2]u16 = [_]u16{ 'f', 'i', 'c', 'e', 'E' => {
                                    \\\\          inline while (i < 5) : (i += 1) {
              zone: zoneid_t = id_t;
pub const PROTOCOL_CHAIN = 32;
    pub const pc = precomp = try allocator.destroy(self);
    const testing = std.debug.runtime_b = "b";
    try a.add(&a, &b);
                      .bit_range_start = 0, .length = T.tag_length]u8 = undefined;
    var token1: TokenIndex {
             \\\\    while ((abs_hop << i, identityElement, arg1: [0x0 ~> 0xfffffffffffffff00000001, @as(isize, 6 - (std.unicode.utf8ToUtf16LeStringLiteral => "StringHashMap;
pub const SERVICE_UNAVAILABLE = 59,
    timezone;
pub const assert = std.math.maxInt;
const HRESULT;
pub fn remove_dir: bool = false,
          return struct {
        if (completion data for the rparen
          while (i < put_thread_atfork(null, sym_link_path_w: []const u8).initCapacity(a.toConst(self: *ArgIteratorGeneral(.{}),
    };
    var x183: u64 = undefined;
    addcarryxU64(&x95, &x96, x94, x61, x77);
    var x185: u64 = undefined;
    cmovznzU64(&x30, &x31, 0x0, x79, x76);
    var x14: u64 = undefined;
             0x38,       0x34,
    S_ALIGN = std.meta.Int(.unsigned) readILEB128(T, reader);
    defer allocation entries.
    PROTINFO,
    /// The per-process to open debug / safe modes, callsite. If the first node = @import("std.zig");
pub const Elf32_Ehdr) == 52);
    var x191: u64 = undefined;
    var x25: u64 = undefined;
    addcarryxU64(&x191, &x192, x183, 0xffffffff00000000000);
    defer a.deinit();
    var x177: u1 = undefined;
    var i: usize = 0;
    pub const auto_hash.autoHash = struct {
        /// The encryption
    addcarryxU64(&x156, &x157, x2, (arg1[27])) << 24);
    const attiny1624 = CpuModel{
                   if (try fifo.readItem().?);
    const featureSet(&[_]Feature{
                    values[i] = true;
           .fxsr,
        cases.addRuntimeSafety(false);
const DWORD = windows.LSTATUS;
pub extern "c" threadlocal var d: Self = @This();
                 shared: bool, comptime check of the type universal unique values,
          new_dir: Dir, old_sub_path);
          pipe,
           .handle = uefi.Guid;
const Msf = struct {
        pub fn deinit(self.allocator.destroy(dir_entry.value_ptr;
                   },
             /// Returns an error set decl" {
        try testing.expectEqual(map.get(1).?, 1);
    var t: u64 = undefined;
        .{ "return",
                 assert(prev_path = path_len]u8 = undefined;
    mulxU64(&x79, &x80, x1, (arg2[1]));
    var x202: u1 = undefined;
    var n_digits and bits <= limb_bits));
    var buf_i: usize = 0;
              self.nbits != 8 or info.Pointer;
                    const other_base }));
    r = frexp128(1.3);
    const client = try renderToken(ais, tree, asm_output));
    try expect(list2.len;
           .ValueBegin;
              try std.fs.cwd().fd, file_path = "socket.unix";
    h = h *% 5 +% 0xe6546b64;
         .avr25,
            .avr25,
              }
                            error.SkipZigTest;
         io_uring_cqe{
                \\\\    a[a[0..5]..a[0..5]];
        pub const DIRECT = 0o4000;
    pub const PATH = 0xC01E0347,
    /// Generator for help in entering a valid state.
    /// {Object Exists} An attempted use.
    pub fn cloneWithAllocator.init(std.testing.expect(eql(u8, byte_order),
    ch_type: Elf32_Word,
        defer it.deinit();
    /// Return a*b+c (mod L)
    pub const IRWXU = 0o700;
    pub const ALRM = 14;
    pub const OSI = ISO;
    pub fn init(key: *const fn (context);
                         .dependencies = featureSet(&[_]Feature{
            close_range = 379,
    /// A null context to perform an `openat` but targeting filled from `old_len` using `drain_previous bits should we returned in errno
    SYMTAB => symtabcmd == null) : (end -= 1) {
            .description = "Enable SPIR-V capability FPGALoopControls how many indentation).
///
/// `in_fd`.
        .description = "Enable UMAC and SMAC for LEON3 and LEON4 process in order to do things can happens-before the epoch.
/// See `intRangeLessThan(context: anytype) @TypeOf(ctx), @TypeOf(vecs[0])) * vecs.len == 1);
              switch (os_tag) {
        Ok,
               .{ .delta = 8, .cutoff = "30092655381050560203999655352889489352157838253365440550624043680727481842041015625" }, // 4096
            \\\\
    );
}
/// Write
         const r = try Fe.fromBytes(src[j * 16 .. j * 16 + j] = @truncate(u8, (x56 & @as(u64, x66) + x62));
                math.add(usize, tty_config.setColor(conf: Config, comptime V: type) comptime for terminal input
    /// /proc/sys/kernel/perf_event_open = 319,
    /// Create a tmp dir for testing.expectEqual(TestEnum) == TestEnum) == TestEnum));
    const abi = self.buf.len < size) {
                try out_stream.zig");
pub usingnamespace switch (err) {
             var buf0: [8]u8 = [8]u8{ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
    pub const STT_NUM = 7;
pub const WSAPROTOCOL = 13,
    // use a GPA to check here, so we have seen "count" {
        try r.setRatio(17, 3);
    const fy = @bitCast(PackedType, asBytes(&@as(u32, 64));
          .Lib => return,
                     self.buffer[end])) : (end += 1;
         }),
    };
    try testTokenize("0b1_", &.{.number_literal});
           .cmov,
         if (self.index = 0xfc;
// HP extensions facility 7 is install a Windows API call to the specified ipv4 addressing) extension8)] = .{
               /// IPv6 multicast_frames: u64, data: []const u8 {
                    return _carry128(&r);
         .pk_fmac_f16_inst,
          const x82 = (x80 >> 1) | ((x82 << 63) & 0xf] +% ((v[r.b] & v[r.c])) | (v[r.b] ^ v[r.a], @as(u32, 0), cqe_openat.user_data: u64,
        .description = "Enable ARMv8.1 Large System
    STALE = 151,
    XFULL = 54,
    // both .UseFirst and largest buffer should
/// be moved before the waiters (was reorders to fields to native Win9x driver
            const t111111 = _100.mul(_10);
           return;
          const full_src_path }, .prefix ++ "Note: Cannot transmit: *const fn (protocol), @ptrToInt(&ksa) else 0,
            .rnglistx => return os.symlinkat = 292,
    tx_heartbeat_errors: []const u8, mode: c.mode_t, value: anytype) Insn {
             .BADF => unreachable;
        \\\\test {
             self.started with iteration is O(N).
          try testing.expect(IntFittingRange(comptime try testing.expect(shuffleVectorIndex(@TypeOf(key));
    try testing.expectEqual(@as(usize, 0), fifo.readableSlice(0)));
         pub const YAKUT_RUSSIA = 0x01;
pub const Self) Self {
                         self.available to run cross compiling for assignment, out.alignment = comments" {
        tv_usec: suseconds_into_minute = 59 });
                   var out: [20]u8 = undefined;
    var x70: u64 = undefined;
    var x398: u1 = undefined;
    var a = try fixed_huffman_only
    pub fn len(list: Self) ?usize {
        return FmtStep = std.x.os.Socket.Address) u32 {
        const resume_node = extra.callconv(.C) Status {
            for (s_) |x, i| {

           } else {
                const end = haystack_bytes.len > 0) {
            \\\\three
         self.thread.child_type = 0x2d;
    pub const Lg6: f64 = 7.91534994289814532176e-04;
    pub const IFLNK = 0o120000;
    pub fn getCpuCount() !usize {

           }
    for (msgvec[0..kvlen]) |iov| {
               return unexpectedErrno(err),
    fn lock(self.tokens_count <= self.im + other.x,
               0x35,
    clock_gettime64 = Linux + 280,
    munlock = 228,
    SBSIZE = 256;
         init_order: Order) void {
             a.unset(i);
         .recv => windows => "windows/desktop/aa387694.aspx */
pub const AS: rlimit_resource code, one for ifreq
    ifrn: extern struct {

        } else switch (wasi.fd_filestat_t) Self {
                   const UNALIGN_SIGBUS = 2;
pub const TCSA = system. Valid version,
                   },
           },
             }
    }
          roundParam(3, 0, 1, 54),
         try expect(!info.is_const anyopaque) u64, 46);
pub const TIMERR_STRUCT = 8,
    /// pro‐tocol is an array of usize.");
    try zig_args.append(&self.install_tls", uninstallation via a device.
                     .crypto,
          }
    }
}
pub const ACC

Expected Behavior

No crash.

Actual Behavior

thread 28920 panic: integer overflow
C:\Programming\Zig\zig-from-the-website\lib\std\zig\Ast.zig:2063:40: 0x7ff61db661d6 in fullContainerDecl (zls.exe.obj)
    switch (token_tags[info.main_token - 1]) {
                                       ^
C:\Programming\Zig\zig-from-the-website\lib\std\zig\Ast.zig:1701:35: 0x7ff61daa4b26 in containerDecl (zls.exe.obj)
        .members = tree.extra_data[data.lhs..data.rhs],
                                  ^
C:\Programming\Zig\buzz\repos\zls\src\ast.zig:980:72: 0x7ff61da02558 in declMembers (zls.exe.obj)
        .container_decl, .container_decl_trailing => tree.containerDecl(node_idx).ast.members,
                                                                       ^
C:\Programming\Zig\buzz\repos\zls\src\analysis.zig:2520:38: 0x7ff61da962ec in makeInnerScope (zls.exe.obj)
    const ast_decls = ast.declMembers(tree, node_idx, &buf);
                                     ^
C:\Programming\Zig\buzz\repos\zls\src\analysis.zig:2631:31: 0x7ff61d9f4df6 in makeScopeInternal (zls.exe.obj)
            try makeInnerScope(allocator, context, node_idx);
                              ^
C:\Programming\Zig\buzz\repos\zls\src\analysis.zig:3025:64: 0x7ff61d9f8166 in makeScopeInternal (zls.exe.obj)
            try makeScopeInternal(allocator, context, field.ast.type_expr);
                                                               ^
C:\Programming\Zig\buzz\repos\zls\src\analysis.zig:2560:30: 0x7ff61da96a93 in makeInnerScope (zls.exe.obj)
        try makeScopeInternal(allocator, context, decl);
                             ^
C:\Programming\Zig\buzz\repos\zls\src\analysis.zig:2631:31: 0x7ff61d9f4df6 in makeScopeInternal (zls.exe.obj)
            try makeInnerScope(allocator, context, node_idx);
                              ^
C:\Programming\Zig\buzz\repos\zls\src\analysis.zig:2496:33: 0x7ff61d9f41cd in makeDocumentScope (zls.exe.obj)
        .enums = &document_scope.enum_completions,
                                ^
C:\Programming\Zig\buzz\repos\zls\src\DocumentStore.zig:208:83: 0x7ff61d9f933e in refreshDocument (zls.exe.obj)
    var new_document_scope = try analysis.makeDocumentScope(self.allocator, handle.tree);
                                                                                  ^
C:\Programming\Zig\buzz\repos\zls\src\Server.zig:1881:53: 0x7ff61d9fb309 in changeDocumentHandler__anon_12775 (zls.exe.obj)
    try server.document_store.refreshDocument(handle.uri, new_text);
                                                    ^
C:\Programming\Zig\buzz\repos\zls\src\Server.zig:2964:35: 0x7ff61da5677c in processJsonRpc__anon_10459 (zls.exe.obj)
                    method_info[2](server, writer, id, request_obj) catch |err| {
                                  ^
C:\Programming\Zig\buzz\repos\zls\src\main.zig:51:34: 0x7ff61da5d754 in loop (zls.exe.obj)
        try server.processJsonRpc(writer, buffer);
                                 ^
C:\Programming\Zig\buzz\repos\zls\src\main.zig:281:13: 0x7ff61da5dbd2 in main (zls.exe.obj)
    try loop(&server);
            ^
C:\Programming\Zig\zig-from-the-website\lib\std\start.zig:385:41: 0x7ff61da5e077 in WinStartup (zls.exe.obj)
    std.debug.maybeEnableSegfaultHandler();
                                        ^
???:?:?: 0x7ffab1d9559f in ??? (???)
???:?:?: 0x7ffab2c0485a in ??? (???)
SuperAuguste commented 1 year ago

oop this is actually an std issue!

SuperAuguste commented 1 year ago

Fix by Travis at https://github.com/ziglang/zig/pull/13996. Will close once that's merged. :)