Ticket #43871

luascript_func_check(): variable used uninitialized on FREECIV_NDEBUG build

Date d'ouverture: 2022-02-15 20:00 Dernière mise à jour: 2022-03-06 02:36

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
1

Détails

luascript_func_check() sets variable pfunc within fc_assert_ret_val(), i.e., it's not set in FREECIV_NDEBUG builds. Later code expects it to be set.

Ticket History (3/6 Histories)

2022-02-15 20:00 Updated by: cazfi
  • New Ticket "luascript_func_check(): variable used uninitialized on FREECIV_NDEBUG build" created
2022-02-20 23:26 Updated by: cazfi
  • Propriétaire Update from (Aucun) to cazfi
  • Résolution Update from Aucun to Accepted
  • Jalon Update from (Aucun) to 3.0.1 (atteints)
Commentaire

Will push also to S2_6.

2022-03-04 04:14 Updated by: cazfi
  • Résolution Update from Accepted to Aucun
Commentaire

As fc_assert_ret_val() is one of the macros of the fc_assert family that we still have active even on --disable-debug builds, there's no *currently* functional bug, and this patch causes compilation failure instead.

Even in case of fc_assert_ret_val(), it's forbidden to have functionality inside it, for the purposes of being able to disable them on ndebug builds on some future versions. So this patch is still needed, just have to fix the compile error.

2022-03-04 04:23 Updated by: cazfi
  • Résolution Update from Aucun to Accepted
Commentaire

Reply To cazfi

As fc_assert_ret_val() is one of the macros of the fc_assert family that we still have active even on --disable-debug builds, there's no *currently* functional bug, and this patch causes compilation failure instead.

No, that was true for S2_6 only. In later branches the functionality is broken + there's no compile failure with the patch -> going to push existing patch to S3_0+, and will do nothing to S2_6.

2022-03-06 02:36 Updated by: cazfi
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Modifier

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