On Sat, Apr 16, 2016 at 05:16:54PM +0200, Tobias Frost wrote: > Source: survex > Severity: normal > > survex FTBFS on hurd-i386 but built before. > Please take a look. > > As this is preventing decrufting of wxwidgets3.0, I've filed an RM for this > arch. > See #821191
The attached patch may help. Please consider it. Thanks, -- Colin Watson [[email protected]]
>From a6a942b99892f6c508ad7d50ae2d3141d3447369 Mon Sep 17 00:00:00 2001 From: Colin Watson <[email protected]> Date: Wed, 4 May 2016 17:51:33 +0100 Subject: [PATCH] Ensure that pcs->begin_survey is initialised read_prefix may longjmp and so avoid the subsequent assignment. This is a targeted fix for test failures visible in some environments and under valgrind. It may fix https://bugs.debian.org/821195. A more complete fix would be to make sure that structures are always zero-filled when they are allocated, but that probably requires work throughout the codebase. --- src/commands.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands.c b/src/commands.c index 2ad26e0..c07b784 100644 --- a/src/commands.c +++ b/src/commands.c @@ -666,9 +666,8 @@ cmd_begin(void) pcs = pcsNew; skipblanks(); - if (isEol(ch) || isComm(ch)) { - pcs->begin_survey = NULL; - } else { + pcs->begin_survey = NULL; + if (!isEol(ch) && !isComm(ch)) { prefix *survey = read_prefix(PFX_SURVEY|PFX_ALLOW_ROOT|PFX_WARN_SEPARATOR); pcs->begin_survey = survey; pcs->Prefix = survey; -- 2.7.4

