#43724: Segfault with cyclic requirements in self-provided goods Open Date: 2022-01-28 15:33 Last Update: 2024-05-04 22:29 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/43724 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43724 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2024-05-04 22:29 Updated by: alienvalkyrie Comment: Reply To cazfi Assuming nobody will suddenly come up with a proper solution Whether it qualifies as "proper" shall be for posterity to judge, but with https://redmine.freeciv.org/issues/554 (runtime recursion check) I don't think there's any reason to revert Self-Provided goods now. --------------------------------------------------------------------- Ticket Status: Reporter: alienvalkyrie Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: S3_2 d3f Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: With the self-provided goods introduced in #43532, infinite recursion is possible via is_req_active -> is_goods_type_in_range -> goods_can_be_provided -> are_reqs_active -> is_req_active if ruleset authors include cyclic dependencies between self-provided goods. This should probably be caught with sanity checks when loading the ruleset rather than crashing. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/43724 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43724