Invalid inputs FAILED (input.at:102) on Solaris

Martin Rehak <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
Hello,

I am trying to uprev bison-3.4.2 to bison-3.7.3 on Solaris. This is the 
only test which fails:

  4: Invalid inputs                                  FAILED (input.at:102)

testsuite.log from case 4 follows:

---<snip>---
#                             -*- compilation -*-
4. input.at:83: testing Invalid inputs ...
/builds/mrehak/workspace/bison/components/bison/bison-3.7.3/tests/input.at:96: "$PERL" -pi -e 's/\\(\d{3})/chr(oct($1))/ge' input.y || exit 77
/builds/mrehak/workspace/bison/components/bison/bison-3.7.3/tests/input.at:98: COLUMNS=1000; export COLUMNS; NO_TERM_HYPERLINKS=1; export NO_TERM_HYPERLINKS; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS;  bison --color=no -fno-caret -fcaret input.y
stderr:
input.y:1.1-2: error: invalid characters: '\0\001\002\377?'
    1 | ÿ?
      | ^~
input.y:2.2: error: invalid null character
    2 | ""
      |  ^
input.y:4.1: error: invalid character: '?'
    4 | ?
      | ^
input.y:5.14: error: invalid character: '}'
    5 | default: 'a' }
      |              ^
input.y:6.1: error: invalid character: '%'
    6 | %&
      | ^
input.y:6.2: error: invalid character: '&'
    6 | %&
      |  ^
input.y:7.1-17: error: invalid directive: '%a-does-not-exist'
    7 | %a-does-not-exist
      | ^~~~~~~~~~~~~~~~~
input.y:8.1: error: invalid character: '%'
    8 | %-
      | ^
input.y:8.2: error: invalid character: '-'
    8 | %-
      |  ^
input.y:9.1-10.0: error: missing '%}' at end of file
    9 | %{
      | ^~
/builds/mrehak/workspace/bison/components/bison/bison-3.7.3/tests/input.at:102: "$PERL" -p -e 's{([\0\377])}{sprintf "\\x%02x", ord($1)}ge' stderr
--- -	2020-11-16 14:37:52.216371958 +0100
+++ /builds/mrehak/workspace/bison/components/bison/build/amd64/tests/testsuite.dir/at-groups/4/stdout	2020-11-16 14:37:52.214908362 +0100
@@ -1,8 +1,8 @@
 input.y:1.1-2: error: invalid characters: '\0\001\002\377?'
-    1 | \x00\xff?
+    1 | \xff?
       | ^~
 input.y:2.2: error: invalid null character
-    2 | "\x00"
+    2 | ""
       |  ^
 input.y:4.1: error: invalid character: '?'
     4 | ?
4. input.at:83: 4. Invalid inputs (input.at:83): FAILED (input.at:102)
---<snip>---

The file is attached as it contains non-printable characters.

This is the input.y:

$ xxd input.y
00000000: 0001 02ff 3f0a 2200 220a 2525 0a3f 0a64  ....?.".".%%.?.d
00000010: 6566 6175 6c74 3a20 2761 2720 7d0a 2526  efault: 'a' }.%&
00000020: 0a25 612d 646f 6573 2d6e 6f74 2d65 7869  .%a-does-not-exi
00000030: 7374 0a25 2d0a 257b 0a                   st.%-.%{.

This test (3) passes on bison-3.4.2. This is stderr from there:

input.y:1.1-2: error: invalid characters: '\0\001\002\377?'
input.y:3.1: error: invalid character: '?'
input.y:4.14: error: invalid character: '}'
input.y:5.1: error: invalid character: '%'
input.y:5.2: error: invalid character: '&'
input.y:6.1-17: error: invalid directive: '%a-does-not-exist'
input.y:7.1: error: invalid character: '%'
input.y:7.2: error: invalid character: '-'
input.y:8.1-9.0: error: missing '%}' at end of file
input.y:8.1-9.0: error: syntax error, unexpected %{...%}

I am not keen on bison, so I would like to ask you for help debugging 
this issue, please. Where should I start, please?

I am not on the list, so reply CCing to [email protected].

Thank you
Martin Rehak
testsuite.log (text/x-log, 1.9 KB)
#                             -*- compilation -*-
4. input.at:83: testing Invalid inputs ...
/builds/mrehak/workspace/bison/components/bison/bison-3.7.3/tests/input.at:96: "$PERL" -pi -e 's/\\(\d{3})/chr(oct($1))/ge' input.y || exit 77
/builds/mrehak/workspace/bison/components/bison/bison-3.7.3/tests/input.at:98: COLUMNS=1000; export COLUMNS; NO_TERM_HYPERLINKS=1; export NO_TERM_HYPERLINKS; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS;  bison --color=no -fno-caret -fcaret input.y
stderr:
input.y:1.1-2: error: invalid characters: '\0\001\002\377?'
    1 | ÿ?
      | ^~
input.y:2.2: error: invalid null character
    2 | ""
      |  ^
input.y:4.1: error: invalid character: '?'
    4 | ?
      | ^
input.y:5.14: error: invalid character: '}'
    5 | default: 'a' }
      |              ^
input.y:6.1: error: invalid character: '%'
    6 | %&
      | ^
input.y:6.2: error: invalid character: '&'
    6 | %&
      |  ^
input.y:7.1-17: error: invalid directive: '%a-does-not-exist'
    7 | %a-does-not-exist
      | ^~~~~~~~~~~~~~~~~
input.y:8.1: error: invalid character: '%'
    8 | %-
      | ^
input.y:8.2: error: invalid character: '-'
    8 | %-
      |  ^
input.y:9.1-10.0: error: missing '%}' at end of file
    9 | %{
      | ^~
/builds/mrehak/workspace/bison/components/bison/bison-3.7.3/tests/input.at:102: "$PERL" -p -e 's{([\0\377])}{sprintf "\\x%02x", ord($1)}ge' stderr
--- -	2020-11-16 14:37:52.216371958 +0100
+++ /builds/mrehak/workspace/bison/components/bison/build/amd64/tests/testsuite.dir/at-groups/4/stdout	2020-11-16 14:37:52.214908362 +0100
@@ -1,8 +1,8 @@
 input.y:1.1-2: error: invalid characters: '\0\001\002\377?'
-    1 | \x00\xff?
+    1 | \xff?
       | ^~
 input.y:2.2: error: invalid null character
-    2 | "\x00"
+    2 | ""
       |  ^
 input.y:4.1: error: invalid character: '?'
     4 | ?
4. input.at:83: 4. Invalid inputs (input.at:83): FAILED (input.at:102)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.