* 3.0.6 SEGV in unset PATH; export PATH
@ 1999-10-04 9:06 Patrik Hagglund
1999-10-04 14:59 ` PATCH: " Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Patrik Hagglund @ 1999-10-04 9:06 UTC (permalink / raw)
To: zsh-workers
(gdb) bt
#0 0x4c3e4 in mkenvstr ()
#1 0x4c57c in addenv ()
#2 0x25d28 in typeset_single ()
#3 0x261d8 in bin_typeset ()
#4 0x1ffac in execbuiltin ()
#5 0x30ea8 in execcmd ()
#6 0x2ec20 in execpline2 ()
#7 0x2e378 in execpline ()
#8 0x2dfa8 in execlist ()
#9 0x3da4c in loop ()
#10 0x3f27c in source ()
#11 0x3f39c in sourcehome ()
#12 0x3f0bc in run_init_scripts ()
#13 0x3d854 in main ()
sparc-sun-solaris2.7
--
Patrik Hägglund
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH: Re: 3.0.6 SEGV in unset PATH; export PATH
1999-10-04 9:06 3.0.6 SEGV in unset PATH; export PATH Patrik Hagglund
@ 1999-10-04 14:59 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-10-04 14:59 UTC (permalink / raw)
To: Patrik Hagglund, zsh-workers
On Oct 4, 11:06am, Patrik Hagglund wrote:
} Subject: 3.0.6 SEGV in unset PATH; export PATH
}
} (gdb) bt
} #0 0x4c3e4 in mkenvstr ()
Patch below. However, the behavior is not the same as 3.1.6 in this case:
unset PATH ; export PATH=/bin:/usr/bin
In 3.0.6 this sets $path to (/bin /usr/bin) and $PATH to /bin:/usr/bin, but
in 3.1.6 it sets only $PATH. Is it intentional that the tied parameter got
uncoupled that way?
Index: Src/builtin.c
===================================================================
@@ -2861,7 +2861,7 @@
pm->ct = auxlen;
if (PM_TYPE(pm->flags) != PM_ARRAY) {
if (pm->flags & PM_EXPORTED) {
- if (!pm->env)
+ if (!(pm->flags & PM_UNSET) && !pm->env)
pm->env = addenv(pname, value ? value : getsparam(pname));
} else if (pm->env) {
delenv(pm->env);
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-10-04 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-04 9:06 3.0.6 SEGV in unset PATH; export PATH Patrik Hagglund
1999-10-04 14:59 ` PATCH: " Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).