Skip to content

fish segfaults on nested eval #9302

@fuzzypixelz

Description

@fuzzypixelz

I'm running fish v3.5.1, on openSUSE Linux 6.0 and TERM=xterm-256color; I have no customizations.

I was trying to do something akin to bash's search and replace in the last command:

> echo Hello
Hello
> eval $(string replace Hello Hi $history[1])
Hi
> eval $(string replace Hello Hi $history[1])
[1]    13363 segmentation fault (core dumped)  fish

If you do this from a parent shell then you get a SIGSEGV (Address boundary error). I really don't have a good idea for what might be causing this, but I suspect it's because there might be an infinite recursion in eval above (not sure about the semantics of fish).

Still, having one's shell segfault is much worse than catching this error or even arbitrarily limiting the depth.

Metadata

Metadata

Assignees

Labels

bugSomething that's not working as intended

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions