GNU bug report logs - #18734
[PATCH] vala: Improper parsing of valac arguments leads to garbage in DIST_COMMON

Previous Next

Package: automake;

Reported by: Colomban Wendling <lists.ban <at> herbesfolles.org>

Date: Wed, 15 Oct 2014 15:44:01 UTC

Severity: normal

Tags: patch

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Colomban Wendling <lists.ban <at> herbesfolles.org>
Subject: bug#18734: closed (Re: bug#18734: [PATCH] vala: Improper parsing
 of valac arguments leads to garbage in DIST_COMMON)
Date: Mon, 06 Apr 2020 00:40:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#18734: [PATCH] vala: Improper parsing of valac arguments leads to garbage in DIST_COMMON

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 18734 <at> debbugs.gnu.org.

-- 
18734: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18734
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Karl Berry <karl <at> freefriends.org>
To: lists.ban <at> herbesfolles.org
Cc: 18734 <at> debbugs.gnu.org
Subject: Re: bug#18734: [PATCH] vala: Improper parsing of valac arguments
 leads to garbage in DIST_COMMON
Date: Sun, 5 Apr 2020 18:39:01 -0600
    -	  if (grep (/$lastflag/, ('-H', '-h', '--header', '--internal-header',
    -	                          '--vapi', '--internal-vapi', '--gir')))
    +	  if (grep (/^$lastflag$/, ('-H', '-h', '--header', '--internal-header',
    +	                            '--vapi', '--internal-vapi', '--gir')))
                {

I installed this change and am closing the bug. Thanks. --karl

[Message part 3 (message/rfc822, inline)]
From: Colomban Wendling <lists.ban <at> herbesfolles.org>
To: bug-automake <at> gnu.org
Subject: [PATCH] vala: Improper parsing of valac arguments leads to garbage
 in DIST_COMMON
Date: Wed, 15 Oct 2014 17:17:00 +0200
[Message part 4 (text/plain, inline)]
Hi,

The parsing of valac flags is too permissive and incorrectly matches
some input, possibly leading to garbage in DIST_COMMON -- and then,
build failures.

The problem is that parsing of valac flags uses a non-anchored pattern
and so any argument happening to be a subset of a parsed argument will
match it, e.g. `vapi` will match against `--vapi` or `--internal-vapi`.

E.g. when using the following:

	something_VALAFLAGS = --vapidir vapi --pkg foo

`--pkg` is recognized as an interesting argument (and so, added to
`DIST_COMMON`) because `vapi` (the argument for `--vapidir`) matched
against `--vapi`.

Please find attached a patch fixing the issue.

Regards,
Colomban
[0001-vala-Fix-parsing-valac-flags.patch (text/x-patch, attachment)]

This bug report was last modified 5 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.