Ticket #48443

action_get_activity() uninitialized value used

Open Date: 2023-07-26 04:31 Last Update: 2023-08-20 17:05

Reporter:
Owner:
Type:
Status:
Closed
Component:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

Valgrind (recent S3_1):

==1403679== Conditional jump or move depends on uninitialised value(s)
==1403679==    at 0x2ABC35: action_get_activity (actions.c:2138)
==1403679==    by 0x2B7502: action_new (actions.c:1622)
==1403679==    by 0x2B77AD: unit_action_new (actions.c:1681)
==1403679==    by 0x2B77AD: hard_code_actions (actions.c:917)
==1403679==    by 0x2B77AD: actions_init (actions.c:1472)
==1403679==    by 0x2CAF9C: game_ruleset_init (game.c:504)
==1403679==    by 0x2CB08E: game_init (game.c:434)
==1403679==    by 0x1574BE: server_game_init (srv_main.c:3387)
==1403679==    by 0x15756F: srv_prepare (srv_main.c:3001)
==1403679==    by 0x157C1C: srv_main (srv_main.c:3447)
==1403679==    by 0x14D247: main (civserver.c:486)

The problem is the assert in the beginning of action_get_activity(). action_new() has not yet set the actor kind when it calls action_get_activity()

Ticket History (3/5 Histories)

2023-07-26 04:31 Updated by: cazfi
  • New Ticket "action_get_activity() uninitialized value used" created
2023-07-26 05:01 Updated by: cazfi
Comment

Only S3_1 affected. There's no activity <-> action stuff in S3_0. S3_2/main use direct actres <-> activity mapping, and do not care about actor kind.

2023-07-30 19:56 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2023-08-20 17:05 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login