mainThe GNU Bourne-Again SHell - Support: sr #110831, Segfault on infinite loop

 
 

sr #110831: Segfault on infinite loop

Submitter:  None
Submitted:  Fri 03 Feb 2023 01:22:51 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 04 Feb 2023 05:54:34 PM UTC, comment #1: 

You start an infinite loop, eventually exhaust your stack space resource limit, and get SIGSEGV (which is the prescribed error for that scenario).

Chet Ramey <chet>
Group administrator
Fri 03 Feb 2023 01:22:51 PM UTC, original submission:  

Hi,

I did a mistake in a function I defined, which creates an infinite loop. While clearly my little code is broken, I noticed it generates a segfault which I don't think is expected here... instead I would expect it eventually runs out of memory. So it seems there is a bug, which might affect other more desirable executions?

To reproduce:
$ bash
$ test() { test "$@" ; echo test ; }  # I forgot 'command' before 'test' here...
$ test
Segmentation fault (core dumped)

I can reproduce this on on bash 5.1.16 and 5.2.1 (I didn't try other versions).

Regards,
Thibault

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-04 chet StatusNone Invalid

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code