#47662: ./common/city.c integer overflow ... cannot be represented in type 'int' Open Date: 2023-03-23 14:13 Last Update: 2023-04-23 22:36 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/47662 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47662 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-04-23 22:36 Updated by: cazfi * Milestone Update from (None) to 3.0.8 * Priority Update from 5 - Medium to 6 Comment: Reply To cazfi I'm now getting that assert failure quite regularly. Frequently enough to consider this a regression blocking 3.0.8. ( #47779 ) --------------------------------------------------------------------- Ticket Status: Reporter: alain_bkr Owner: (None) Type: Bugs Status: Open Priority: 6 MileStone: 3.0.8 Component: Server Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: 3.0.6 clang This one is a bit weird : the value are always (-1 billion + epsilon) * 100 , and show identical values in different random games Count of errors : 7 ../../common/city.c:2880:37: runtime error: signed integer overflow: -999999992 * 100 cannot be represented in type 'int' ### ~ 50 max_int 5 ../../common/city.c:2880:37: runtime error: signed integer overflow: -999999991 * 100 cannot be represented in type 'int' 4 ../../common/city.c:2880:37: runtime error: signed integer overflow: -999999994 * 100 cannot be represented in type 'int' 3 ../../common/city.c:2880:37: runtime error: signed integer overflow: -999999987 * 100 cannot be represented in type 'int' 6 ../../common/city.c:2873:25: runtime error: signed integer overflow: -999999990 * 100 cannot be represented in type 'int' 6 ../../common/city.c:2873:25: runtime error: signed integer overflow: -999999989 * 100 cannot be represented in type 'int' 3 ../../common/city.c:2873:25: runtime error: signed integer overflow: -999999994 * 100 cannot be represented in type 'int' 3 ../../common/city.c:2873:25: runtime error: signed integer overflow: -999999993 * 100 cannot be represented in type 'int' 3 ../../common/city.c:2873:25: runtime error: signed integer overflow: -999999987 * 100 cannot be represented in type 'int' 6 > ../../common/city.c:2866:21: runtime error: signed integer overflow: -999999992 * 100 cannot be represented in type 'int' 3 > ../../common/city.c:2866:21: runtime error: signed integer overflow: -999999994 * 100 cannot be represented in type 'int' 3 > ../../common/city.c:2866:21: runtime error: signed integer overflow: -999999991 * 100 cannot be represented in type 'int' 3 > ../../common/city.c:2866:21: runtime error: signed integer overflow: -999999987 * 100 cannot be represented in type 'int' I'll try to investigate a bit and provide saved games. -- 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/47662 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47662