Tíquete #43871

luascript_func_check(): variable used uninitialized on FREECIV_NDEBUG build

: 2022-02-15 20:00 Última Atualização: 2022-03-06 02:36

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
1

Details

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
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
  • Marco Update from (Nenhum) to 3.0.1 (fechado)
Comentário

Will push also to S2_6.

2022-03-04 04:14 Updated by: cazfi
  • Resolução Update from Accepted to Nenhum
Comentário

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
  • Resolução Update from Nenhum to Accepted
Comentário

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
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login