Ticket #43871

luascript_func_check(): variable used uninitialized on FREECIV_NDEBUG build

오픈 날짜: 2022-02-15 20:00 마지막 업데이트: 2022-03-06 02:36

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
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
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.0.1 (closed)
댓글 올리기

Will push also to S2_6.

2022-03-04 04:14 Updated by: cazfi
  • Resolution Update from Accepted to None
댓글 올리기

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
  • Resolution Update from None to Accepted
댓글 올리기

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
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login