From nobody Wed Nov 30 15:03:46 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NMjC63RR7z4hkcb for ; Wed, 30 Nov 2022 15:03:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NMjC619Q7z3rxZ for ; Wed, 30 Nov 2022 15:03:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669820626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YEqgYl78Pc0qm6Wnx2HDZKdnfudHSdKb8MejGsefE38=; b=eGkzN/iRxX7FgbUJcZwysWLg6f6KtLmFE4ChdmEWnYnB6Aml5IvSe57rQwvI+/cYzVRQru T1WYxRkQ4rr6D00b94zXGYtqO7LM46hLZ3FdhjD3boJbyVSTZjgmxKJNVGyxAxRRswblZM vigTsX1Jako7GfZyz1oyAQKUDMurSPqXcd23gMCwSdPSdb1J01Wc2gLpu2VSyS0tFktW17 36NYo7ZjsrqwilVREJIsy4OWWKHrFSxedUvRFzx2Q7lcLM2UyTNieSR0pH31fT7OijEId4 jXCwDhj4pwQBB4NjXpeYQ1X5nj0UImEReyLdB2pKe/Y2STlWJikbHJtUKpzXig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669820626; a=rsa-sha256; cv=none; b=J7c/NzkdjWu+ZRXZhgGvdRTlSHGQLEZdL5l4OGnZVBVSWaseG1nsEvqIgF0ZHjww7TMt+x Rh2uFhpM1TyGwzVeEB7IRRL3Eceew+IHdqP7J9Ozczb/TDFN9gIApv2f4mEVOOk+Fdeb/m A5RdcqDyjLQbLDDYyHTjrMfwcR4ytDgHjNHxog6tlIb1EioDxakMkL30RevvYKQdPjXmdT USNMJwgphCouBuYKoFWcaiPN7qWCdJVawLt4hJlzVXncD0cotO1WOENnxySamenE+7Qn5i Zdjsrnh2Hoy3g0E+mxzyk9UgPFnBNge9CtvqkxvrvxVGINqP7y24ejTZtDnLLg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NMjC60Cs1z11nQ for ; Wed, 30 Nov 2022 15:03:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2AUF3jHQ053771 for ; Wed, 30 Nov 2022 15:03:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2AUF3jFf053770 for bugs@FreeBSD.org; Wed, 30 Nov 2022 15:03:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268076] dc(1): crash on window size change Date: Wed, 30 Nov 2022 15:03:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: gavin.d.howard@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268076 Gavin D. Howard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gavin.d.howard@gmail.com --- Comment #3 from Gavin D. Howard --- Author of the bc/dc here. I have reproduced this behavior. A couple notes first. I don't think bc's error handling "obscures" things. When it outputs the er= ror it did, that's because there *was* an I/O error, but one on either `stdin`, `stdout`, or `stderr`. Handling terminal stuff requires a lot of I/O, and if any of it fails, especially since it would have happened on one of the stan= dard streams that should nearly always work, bc/dc has to assume that something = has gone terribly wrong, so it quits with a complaint. But the error handling is actually the same between the calculators, so dc should not have acted differently from bc if history were activated. That was the problem: in dc, history is *not* activated by default. The bug= is that el_resize() was called anyway, despite not being initialized. I have pushed a commit (https://git.yzena.com/gavin/bc/commit/19f8e4f325f53= 8) that fixes the crash. That seems to have fixed the problem. Can you pull my changes and test that it works for you? You will need to bu= ild like so: ``` ./configure -e -gO0 make ``` And the built programs will be `bin/bc` and `bin/dc`. By the way, if you want to activate history in dc, you need to set the `DC_TTY_MODE` environment variable to a non-zero integer value. The reason = it is not activated by default is because that's the behavior of the old dc. --=20 You are receiving this mail because: You are the assignee for the bug.=