Variable length arrays in WSREP code

Bug #1409042 reported by Alexey Kopytov
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
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.