This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Bad ZSH Compile #19499
Labels
Comments
Please link to the mailing list. |
Can you post your |
|
This is actually probably related to a ZSH bug which was found (same thread as I posted above). I'll leave this bug open pending a response on the mailing list. |
Any new information on the mailing list or bug tracker? |
Yep, the following patch was applied to master which fixes the crash. Note that you may have trouble if you try to apply this patch directly as ZSH source uses a mixture of tabs and spaces and github seems to turn the tabs in the patch into spaces. --- zsh-5.0.2/Src/init.c 2012-11-09 13:53:12.000000000 -0800
+++ zsh-5.0.2.new/Src/init.c 2013-05-04 11:40:02.000000000 -0700
@@ -281,9 +281,10 @@
/**/
static void
-parseopts_insert(LinkList optlist, void *ptr)
+parseopts_insert(LinkList optlist, void *base, int optno)
{
LinkNode node;
+ void *ptr = base + (optno < 0 ? -optno : optno);
for (node = firstnode(optlist); node; incnode(node)) {
if (ptr < getdata(node)) {
@@ -390,7 +391,7 @@
if (dosetopt(optno, action, !nam, new_opts) && nam) {
WARN_OPTION("can't change option: %s", *argv);
} else if (optlist) {
- parseopts_insert(optlist, new_opts+optno);
+ parseopts_insert(optlist, new_opts, optno);
}
}
break;
@@ -415,7 +416,7 @@
if (dosetopt(optno, action, !nam, new_opts) && nam) {
WARN_OPTION("can't change option: -%c", **argv);
} else if (optlist) {
- parseopts_insert(optlist, new_opts+optno);
+ parseopts_insert(optlist, new_opts, optno);
}
}
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following crashes ZSH
emulate -R sh -o braceexpand -c 'foo() {; setopt; }'
I emailed the zsh-users mailing list about it and was told that it's due to an incorrect compile of ZSH. Re-installing ZSH didn't help, so I assume it's a problem with the package.
Sorry I haven't had time to look into it further.
The text was updated successfully, but these errors were encountered: