Update of bug #61100 (group groff): Status: In Progress => Fixed Open/Closed: Open => Closed Planned Release: None => 1.24.0
_______________________________________________________ Follow-up Comment #9: commit c6bcc7ea6921c35074132689eb55e43d531663c4 Author: G. Branden Robinson <g.branden.robin...@gmail.com> Date: Sun Sep 1 21:06:16 2024 -0500 [groff]: Regression-test Savannah #61100. * src/roff/groff/tests/double-do-request-does-not-raise-assertion.sh: Do it. * src/roff/groff/groff.am (groff_TESTS): Run test. Test fails at this commit. commit d50be3efd3e5b4d1e139c420a75be6686a318427 Author: G. Branden Robinson <g.branden.robin...@gmail.com> Date: Mon Sep 2 00:43:47 2024 -0500 [troff]: Fix Savannah #61100. Prevent nested use of `do` requests from causing an assertion failure. * src/roff/troff/input.cpp: Improve handling of nested selections of compatibility mode. Use a global STL stack of `bool`, `want_att_compat_stack`, to manage them. Drop global `int` `do_old_want_att_compat` with its less-useful-than-hoped "-1" value to signal an outermost "scope". (do_request): Drop dubious `assert()`ion. Push the value of `want_att_compat` onto the stack before invoking/calling the named request/macro, and pop it afterwards. (class enclosing_want_att_compat_reg): Add new class to handle dynamic construction of `.cp` register value. I modeled the approach on an idiom heavily used in "env.cpp", where read-only registers are not modeled as accessors of C++ globals, because they interpolate per-environment state. (enclosing_want_att_compat_reg::get_string): Member function of new class constructs `.cp` register value by peeking at the top of `want_att_compat_stack`. (init_input_requests): Wire up `.cp` register to an object of `enclosing_want_att_compat_reg` class instead of now-dead `do_old_want_att_compat` global. Fixes <https://savannah.gnu.org/bugs/?66110>. Problem introduced by me when introducing `.cp` register in commit 6a37bb5f00, 17 April 2020. Thanks to Bjarni Ingi Gislason for suggesting the direction a minimal reproducer could take. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61100> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature