Incidencia #43871

luascript_func_check(): variable used uninitialized on FREECIV_NDEBUG build

Abrir Fecha: 2022-02-15 20:00 Última actualización: 2022-03-06 02:36

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
  • Hito Update from (Ninguno) to 3.0.1 (cerrado)
Comentario

Will push also to S2_6.

2022-03-04 04:14 Updated by: cazfi
  • Resolución Update from Accepted to Ninguno
Comentario

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
  • Resolución Update from Ninguno to Accepted
Comentario

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 Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar