bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eval '<$(;)' causes Segmentation Fault


From: Zachary Santer
Subject: Re: eval '<$(;)' causes Segmentation Fault
Date: Mon, 26 Aug 2024 22:57:19 -0400

On Sun, Aug 25, 2024 at 8:57 PM <youheng.lue@gmail.com> wrote:
>
>         All the following scripts can create a Segmentation Fault
>
>         eval '<$[;]'
>
>         eval '<$(;)'
>
>         eval '<${;}'
>
>         eval '<$[|]'
>
>         eval '<$(|)'
>
>         eval '<${|}'


Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: msys
Compiler: gcc
Compilation CFLAGS: -g -O2
uname output: MSYS_NT-10.0-19045 Zack2021HPPavilion
3.5.3-d8b21b8c.x86_64 2024-07-09 18:03 UTC x86_64 Msys
Machine Type: x86_64-pc-msys

Bash Version: 5.3
Patch Level: 0
Release Status: alpha

This is devel, commit 2e01122fe7.

Really don't get what's going on here:

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ ./bash

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ declare -p BASH_VERSION
declare -- BASH_VERSION="5.3.0(1)-alpha"

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ eval '<$[;]'
bash: ;: arithmetic syntax error: operand expected (error token is ";")

[1]+  Stopped

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ eval '<$(;)'
bash: syntax error near unexpected token `;'

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ eval '<${;}'
bash: ${;}: bad substitution

[2]+  Stopped

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ eval '<$[|]'
bash: |: arithmetic syntax error: operand expected (error token is "|")

[3]+  Stopped

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ eval '<$(|)'
bash: syntax error near unexpected token `|'

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ eval '<${|}'
bash: ${ }: ambiguous redirect

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ jobs
[1]   Stopped
[2]-  Stopped
[3]+  Stopped

I now have anonymous, stopped background jobs, I guess.

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ fg 1


zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ jobs

[1]+  Stopped

zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ fg 1


zsant@Zack2021HPPavilion MSYS ~/repos/bash
$ jobs

[1]+  Stopped

Okay.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]