SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-lin ux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
IMHO any user action should not lead to SIGSEGV! I am not objecting against recursive "sourse" itself. But when I got SIGSEGV from "bash", I have no idea why this is happened. I have made recursive "sourse" by mistake and spend a lot of time looking up what exactly lead to SIGSEGV. Put a configura

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 11:30 GMT-07:00 Eric Blake : > On 08/28/2014 12:02 PM, bogun.dmit...@gmail.com wrote: > > IMHO any user action should not lead to SIGSEGV! I am not objecting > against > > recursive "sourse" itself. But when I got SIGSEGV from "bash", I have no > > idea why this is happened. I have made

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 11:54 GMT-07:00 Greg Wooledge : > On Thu, Aug 28, 2014 at 11:49:02AM -0700, bogun.dmit...@gmail.com wrote: > > So why I should got SIGSEGV instead of nice, detailed error message in > > recursion? We can detect it? > > You can't detect that it's going to happen. You can only receive th

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 12:08 GMT-07:00 Eric Blake : > On 08/28/2014 12:49 PM, bogun.dmit...@gmail.com wrote: > > > If follow this logic - we shoul try to catch incorrect user behaviour... > we > > will got errors/signals from kernel. > > > > Simple situation: > > $ ((1/0)) > > bash: ((: 1/0: division by 0 (er

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 13:59 GMT-07:00 Bob Proulx : > bogun.dmit...@gmail.com wrote: > > Eric Blake wrote: > > > bogun.dmit...@gmail.com wrote: > > > > IMHO any user action should not lead to SIGSEGV! I am not objecting > against > > > > recursive "sourse" itself. But when I got SIGSEGV from "bash", I > have

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 14:43 GMT-07:00 Eric Blake : > On 08/28/2014 03:00 PM, bogun.dmit...@gmail.com wrote: > >>> Whey there is check on division by zero? We can predict this? - No. But > >> we > >>> can detect it... and we out nice, detailed error message. > >> > >> Actually, division by zero is fairly easy

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 14:57 GMT-07:00 Eric Blake : > On 08/28/2014 03:50 PM, bogun.dmit...@gmail.com wrote: > > Any action in my script should lead to SIGSEGV in interpreter! If I write > > program on some compilable language, for example C, compile it and got > > SIGSEGV - this is my problem. But in this ca

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 15:11 GMT-07:00 Chris Down : > bogun.dmit...@gmail.com writes: > >> Is it so heavy to check length of $BASH_SOURCE array? >> > > Adding artificial barriers that don't actually solve the problem are > "heavy" in terms of technical debt, even if not code. > Ok. Please remove FUNCNEST limi

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 15:32 GMT-07:00 Eric Blake : > On 08/28/2014 04:11 PM, bogun.dmit...@gmail.com wrote: > >> If gcc segfaults because it implements #include via recursion, and I > >> wrote a recursion loop of #includes into my source, then I'd say the bug > >> was mine, not gcc's. Just the same as if yo

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread bogun.dmitriy
2014-08-28 15:44 GMT-07:00 Chris Down : > bogun.dmit...@gmail.com writes: > >> And what for this mailing list? Don't answer, this have no any sense any >> more. >> > > This mailing list is for reporting bugs. So far nobody thinks that what > you reported is a bug, so you would essentially be makin

Re: SEGFAULT if bash script make "source" for itself

2014-09-04 Thread bogun.dmitriy
2014-09-03 7:31 GMT-07:00 Chet Ramey : > On 8/28/14, 2:02 PM, bogun.dmit...@gmail.com wrote: > > IMHO any user action should not lead to SIGSEGV! I am not objecting > against > > recursive "sourse" itself. But when I got SIGSEGV from "bash", I have no > > idea why this is happened. I have made rec