From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12489 invoked from network); 12 May 2023 16:13:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 May 2023 16:13:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1683907990; b=Cxt+h9Vif3z1UK9zNpskOjTyEYCAyVCnd2nl6NWElgRUOmaBW3ek+ecmtupYnDm2aRYthjKNha yvkPfe8HxuI9664cq155n6npy5xSbA8RVFocfCh8Sl13oqjFt7EgtixIFMMOuixeHQLSyFKJbb tWT53A3GN3TV9jT3jKuv3EK/uZN+Bosw3yrdpmZQGMYBHscEsBlDmhSKBcHH4X+F0D6tyK2eik ZFdtC/mkenCuMgoZ7gOM90tGPXCNbjv8V2FIhL3uZ4pPF5j/qTxSqf7a6kPcOrWdjEgVlO+RjS 5zHRg8mAe0ZAJNtuPpCKs6dNxDzlxW1hixjMHZm+/VVBTg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1683907990; bh=v1aVF4chBzkoV+r2ojzK2hY021WF1vRg/y8i5eHG33Y=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=kpx7tbJtUM5eF9F/0Zo5HN5hy7iQDJKvCPc0QZe+DTtHQNJ5kdnchxOM+Wwp9QHlA9DiZWYiXc rKUW+NKdz/0I9EPFF7m6cbLd+ccaw5OC8PAU1R5AsqfBsNXTMBZKV7cSMHjzt5otSBZQ/WYkEe pFPwxLRYhKnx5XjQI7EZjTpaKO5B7oByNXSu9FO+WDRTAGQitmCqRtrY+t93X9DhWTjmFIDDdv EPrNDp9ttIAJktF9ukDvTWJdBSudHfMS72QtMBOaES4fvVNBSSpMqZCyui5XCg1XxbV5jhqv5i sbLzHJ8+L7XyV/kD1kRgNZLSzHTG8R6FRRD9gstYIT+pgw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=v1aVF4chBzkoV+r2ojzK2hY021WF1vRg/y8i5eHG33Y=; b=By8jN7GltPz4Zngspv067zaEA9 ecWrTT4iAOzw0CYteV2Ej8Ve121Au8dsD7tosUTyy+JKwgOZuEY2Y3pvEcQ8nfdXGEBHFmVGHjceA gS6GBDLetH9WFniCjYsmBrtpHpPcTMQbTMPog2K0WZ5c0xykbzApt2uIt+qDZ/QOr0lybMWvAtMrX lqesdzzBkTCYjy3anBI72SkJ1asPqu7yx19hjvogdYpq2tIOs9J/pCpNDq21vcrJBEdw2GUuxH3JQ ShcgnkIYDvIkvEBTXb5nUOz5O6L5dY+GNiq6zh+kLYj5QOrjOC/+UWUpP/EqiSKgHrn3G6k4VQCIp WUzAlXdw==; Received: by zero.zsh.org with local id 1pxVOG-000Kw3-BH; Fri, 12 May 2023 16:13:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f51.google.com ([209.85.218.51]:59820) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pxVNw-000Ke3-Tn; Fri, 12 May 2023 16:12:50 +0000 Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-96aae59bbd6so153603566b.3 for ; Fri, 12 May 2023 09:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1683907968; x=1686499968; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=v1aVF4chBzkoV+r2ojzK2hY021WF1vRg/y8i5eHG33Y=; b=EhAxfjCYBLR8aLwE6p+NJ4B51SewImkNpt/KsboGyq6mOwgKEE6aQlpvdhtQ8aLDFK vxgNUI2Z78abqEIDhAQ+gmJPBWIs/UpbhgSOoSUw+2YR19DdliV/7Z4Vae8MWaIw4T/8 L1Z6TxqV6KRvTHEzTl4ylQA7msp9JjXkDU6D6cYwsaL9bmfdqGfz8aT8ExD1jPEPyDtH eM31B+HfWFGElbHezPiIm3pb1d2PcoT1vfb5uc01yiSdJ/019SZgQ4b0TICbn+QUa7Id 6aJRfV/aqmsT9vkOHUVlLjq902+wLghklcxB+5f+mKCuVAlReE9QtuR12s5GfA84frH2 4qug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683907968; x=1686499968; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v1aVF4chBzkoV+r2ojzK2hY021WF1vRg/y8i5eHG33Y=; b=hJKyC0ls4wOpIKNjIviVj72A1V56ZidJfH9B4GOa3hnypud/lySfquQjM6qS053kYB Xn553Fun1qnh+JoMt3HHeMOgCvWP8YMjhTI51euLXItln+brs9YFDEe/YUQfdrzneEUp elgfgSvAcrlQVBqgU4D7+8UulI9pbyWp6Tlc6aBIi4wxkHs7JyFAH2EczJEdfrUpX1UA YjHuevIQ+HRIiSVQ4//jlgMGES/KfZehpDPNIzMKjRmW9vxN81jdVSKBBQybY0By8QNj w8pdQ/Zs22bvUJifXdFvngl1hFP01zJPv+nx1YI5NsBtERMR3+jkiHFv1BWL/TpVnw5N zXfA== X-Gm-Message-State: AC+VfDy5L2whXK2amoOkO/OussXNPL83PPHIkQ92krs9aeSu8+oARorJ Nia9HP8KgXQltUmHxyQGTnoqwWWKjMuDyYdjfrEMIg== X-Google-Smtp-Source: ACHHUZ4x8ssIwWOaqUS4Dqr8X2RCfsq9EfxndTVN3Hnw7cAz6LHPFefMCLonJ8fFkNzTexTrxuYkZfNuapCHUElmp6c= X-Received: by 2002:a17:907:e92:b0:96a:47d7:8b52 with SMTP id ho18-20020a1709070e9200b0096a47d78b52mr8428024ejc.77.1683907968339; Fri, 12 May 2023 09:12:48 -0700 (PDT) MIME-Version: 1.0 References: <76e1d7d098d80e2c8bb9746ba964a0fbd41cc140.camel@ntlworld.com> <290263641.10091739.1683707984531@mail.virginmedia.com> <786956771.10261130.1683883695977@mail.virginmedia.com> In-Reply-To: <786956771.10261130.1683883695977@mail.virginmedia.com> From: Bart Schaefer Date: Fri, 12 May 2023 09:12:36 -0700 Message-ID: Subject: Re: Bug: Searching through sufficiently large $historywords causes seg fault To: Peter Stephenson Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51740 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, May 12, 2023 at 2:28=E2=80=AFAM Peter Stephenson wrote: > > Here's the only obvious case I can see in normal history management > where you might get a miscalculation On Wed, May 3, 2023 at 8:35=E2=80=AFAM Sebastian Gniazdowski wrote: > > (gdb) p (int)(e-hstr) > $65 =3D -31903 Is it not possible that what we actually have here is a huge overflow in (e) such that (e-hstr) is a very large unsigned?