Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #870482

gcc9 -O3: caravan ‘data.result’ may be used uninitialized

Added by Marko Lindqvist 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Seen on S3_0 and S2_6 (master not affected) when building with gcc9, -O3 optimization level:

../../../../src/common/aicore/caravan.c: In function ‘caravan_evaluate’:
../../../../src/common/aicore/caravan.c:588:25: error: ‘data.result’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
588 | fc_assert_ret_val(data->result, FALSE);

History

#1 Updated by Marko Lindqvist 9 months ago

Marko Lindqvist wrote:

Seen on S3_0 and S2_6 (master not affected) when building with gcc9, -O3 optimization level:

Compiler might not give warning in master, but there's a real bug there that is present in master too.

caravan_evaluate_withtransit() does not set result pointer to callback data, so result can never be set in the callback. Thus caravan_evaluate_withtransit() always only initializes result.

#3 Updated by Marko Lindqvist 9 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF