Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases with semicolons can cause a StackOverflowError #933

Closed
gseitz opened this issue Oct 23, 2013 · 0 comments
Closed

Aliases with semicolons can cause a StackOverflowError #933

gseitz opened this issue Oct 23, 2013 · 0 comments
Assignees
Labels
Milestone

Comments

@gseitz
Copy link
Member

gseitz commented Oct 23, 2013

Aliases are prone to StackOverflowErrors given these conditions:

  1. The value starts with a semicolon
  2. The alias is a prefix of a command/task on the RHS

The following aliases reproduce this issue:

  • alias cl=;clean
  • alias co=;clean;compile

Here's a transcipt of an sbt-0.13.0 session:

> alias c=;clean
tmp-0.1-SNAPSHOT (-)
> c
[error] java.lang.StackOverflowError
[error] Use 'last' for the full log.
tmp-0.1-SNAPSHOT (-)
> alias c=clean
tmp-0.1-SNAPSHOT (-)
> c
[success] Total time: 0 s, completed 23.10.2013 16:08:35
tmp-0.1-SNAPSHOT (-)
>
@ghost ghost assigned harrah Oct 23, 2013
@harrah harrah closed this as completed in 1d9b44d Nov 24, 2013
harrah added a commit that referenced this issue Mar 21, 2014
This avoids an additional cause of recursion via the semicolon/multiple command, which fixes #933.
It also provides error messages on the expanded command.  This fixes #598.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants