Re: What is the purpose of parser-built?

2019-02-06 Thread Eric Blake
On 2/6/19 5:05 PM, Peng Yu wrote: > On Wed, Feb 6, 2019 at 4:49 PM Eric Blake wrote: >> >> On 2/6/19 4:18 PM, Peng Yu wrote: >>> Hi, >>> >>> I deleted the file parser-built, and bash still compiles and an empty >>> parser-built file will be generated upon compilation. What is the >>> purpose of th

Re: Where is yacc_EOF defined?

2019-02-06 Thread Eric Blake
On 2/6/19 4:33 PM, Peng Yu wrote: > Hi, > > yacc_EOF is mentioned in parse.y in something like this > > %left '&' ';' '\n' yacc_EOF > | error yacc_EOF > > But I don't find where it is defined similarly to other tokens like BAR_AND. Then you aren't very familiar with yacc. Per 'man yacc':

Re: What is the purpose of parser-built?

2019-02-06 Thread Peng Yu
On Wed, Feb 6, 2019 at 4:49 PM Eric Blake wrote: > > On 2/6/19 4:18 PM, Peng Yu wrote: > > Hi, > > > > I deleted the file parser-built, and bash still compiles and an empty > > parser-built file will be generated upon compilation. What is the > > purpose of this file? Should it be deleted? Thanks.

Re: What is the purpose of parser-built?

2019-02-06 Thread Eric Blake
On 2/6/19 4:18 PM, Peng Yu wrote: > Hi, > > I deleted the file parser-built, and bash still compiles and an empty > parser-built file will be generated upon compilation. What is the > purpose of this file? Should it be deleted? Thanks. Look at Makefile.in: GRAM_H = parser-built y.tab.o: y.tab.h

Where is yacc_EOF defined?

2019-02-06 Thread Peng Yu
Hi, yacc_EOF is mentioned in parse.y in something like this %left '&' ';' '\n' yacc_EOF | error yacc_EOF But I don't find where it is defined similarly to other tokens like BAR_AND. %token GREATER_BAR BAR_AND Where is yacc_EOF defined? (y.tab.c and y.tab.h are files generated by bison. so y

What is the purpose of parser-built?

2019-02-06 Thread Peng Yu
Hi, I deleted the file parser-built, and bash still compiles and an empty parser-built file will be generated upon compilation. What is the purpose of this file? Should it be deleted? Thanks. -- Regards, Peng

AddressSanitizer: heap-use-after-free on (...) in rl_do_undo ../../../bash-devel/lib/readline/undo.c:188

2019-02-06 Thread Eduardo A . Bustamante López
I found another issue in rl_do_undo, but I haven't been successful in figuring out how it happens. I've been working with the `devel' branch, commit `8a9718cfc93958b34e205d0507c3bbf64cba6db5' Here's how I built the binaries I use below: debian@debian-fuzz:~/tmp$ cat ~/build.sh #!/bin/bash mkd

Re: The use of register keyword in bash source code

2019-02-06 Thread Andreas Schwab
On Feb 06 2019, Peng Yu wrote: > If it is ignored anyway, why "register" is used in many places in the > code? Thanks. Because compilers were dumb in the old days. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "A

Re: The use of register keyword in bash source code

2019-02-06 Thread Peng Yu
> No, that is what volatile means. The register keyword is just an > optimisation hint, and is mostly ignored by the compiler. If it is ignored anyway, why "register" is used in many places in the code? Thanks. -- Regards, Peng

Re: The use of register keyword in bash source code

2019-02-06 Thread Andreas Schwab
On Feb 06 2019, Peng Yu wrote: > I see many variables are declared with the "register" keyword. I know > its purpose is to tell compile always access the corresponding memory > without assuming the previously accessed values are preserved. This is > usually to deal with some external devices. No

The use of register keyword in bash source code

2019-02-06 Thread Peng Yu
Hi, I see many variables are declared with the "register" keyword. I know its purpose is to tell compile always access the corresponding memory without assuming the previously accessed values are preserved. This is usually to deal with some external devices. But I don't understand why it is usefu