[PATCH] Fix BZ17292 parse error of string auto-concatenation in printf statement

David Smith dsmith@redhat.com
Fri Dec 19 14:43:00 GMT 2014


On 12/19/2014 03:46 AM, Hushan Jia wrote:
> Fix BZ17292 parse error of string auto-concatenation in printf statement
> 
> Use multi part string concatenation as the format string of printf
> statement will cuase following parse error:
> 
> $ /usr/bin/stap -p1 testsuite/parseok/strconcat.stp
> parse error: expected ','
> 	saw: string 'bar' at testsuite/parseok/strconcat.stp:6:19
>      source:     printf("foo " "bar" "\n")
>                                ^
> 
> 1 parse error.
> Pass 1: parse failed.  [man error::pass1]
> 
> This fix is suggested by fche.
> 
> Signed-off-by: Hushan Jia <hushan@smartx.com>

Wow! Thanks, this is awesome - you even included a test case.

I'll test this today and check it in.

(I've had a thought - I wonder if this sort of thing needs fixing other
places...)

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)



More information about the Systemtap mailing list