severity 748229 minor thanks Hi,
This is a fascinating report.
On Thu, May 15 2014, Michael Tautschnig wrote:
> The function testerror (generated from yyerror) requires 2 arguments:
>
> http://sources.debian.net/src/flex/2.5.39-5/tests/test-bison-yylloc/parser.y?hl=92#L92
>
> Yet the call at line 81 of the same file only passes a string, which will thus
> implicitly be converted to void*, used as first argument, and the second
> argument will be arbitrary, resulting from stack underflow.
This is correct. So why does it compile? I am not sure I
--8<---------------cut here---------------start------------->8---
understand what is going on there. I am looking at:
gcc -E -I. -I../.. -I../.. -I. -D_FORTIFY_SOURCE=2 -g -O2 \
-fstack-protector --param=ssp-buffer-size=4 -Wformat \
-Werror=format-security parser.c|
--8<---------------cut here---------------end--------------->8---
> In addition to this issue, the generated yyparse/testparse invokes testerror
> in
> fact with 3 arguments:
>
> testerror(&yylloc, scanner, (const void *)"memory exhausted");
>
> This should be fixed as well.
--8<---------------cut here---------------start------------->8---
./test-bison-yylloc < ./test.input
0001: FIRSTNAME=firstname
0002: MIDDLENAME=middle
0003: LASTNAME=lastname
0004: ADDRESS=address
--8<---------------cut here---------------end--------------->8---
Well, this is only in the test suite; and indeed, in a test
suite that compiles and runs, so I am lowering this to a minor bug,
and continuing to investigate.
manoj
--
Even a cabbage may look at a king.
Manoj Srivastava <[email protected]> <http://www.golden-gryphon.com/>
4096R/
--
If some people didn't tell you, you'd never know they'd been away on
vacation.
Manoj Srivastava <[email protected]> <http://www.golden-gryphon.com/>
4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20 05B6 CF48 9438 C577 9A1C
signature.asc
Description: PGP signature

