Variable length arrays in WSREP code

Bug #1409042 reported by Alexey Kopytov on 2015-01-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Medium
Alexey Kopytov
5.6
Fix Released
Medium
Alexey Kopytov

Bug Description

There are many sites in the WSREP code where variable length arrays are used, and that breaks debug builds in the latest 5.5 and 5.6 releases.

For example, verify() in wsrep_loader.c contains the following code which makes debug builds fail with the "error: variable length array 'msg' is used" error:
---
static int verify(const wsrep_t *wh, const char *iface_ver)
{
    const size_t msg_len = 128;
    char msg[msg_len];
---

The reason is that -Wvla has been added to recent MySQL 5.5 and 5.6 versions.

Related branches

summary: - Variable length array in wsrep_loader.c
+ Variable length arrays in WSREP code
description: updated

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1119

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers