* coredump on dev-7 (ALL_EXPORT)
@ 2000-11-25 16:08 Naoki Wakamatsu
2000-11-25 18:03 ` Thomas Köhler
2000-11-25 19:07 ` PATCH: " Bart Schaefer
0 siblings, 2 replies; 4+ messages in thread
From: Naoki Wakamatsu @ 2000-11-25 16:08 UTC (permalink / raw)
To: zsh-workers
Zsh-dev-7 generates core file by executing as follows:
(On Linux-2.2.14 or Solaris2.6)
% zsh -f
% autoload -U compinit; compinit
% setopt ALL_EXPORT
% sudo rpm /[TAB]
zsh: 17285 segmentation fault (core dumped) zsh -f
%
The backtrace is
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
#0 mkenvstr (name=0x139d68 "opt_args", value=0x0, flags=4112) at params.c:2995
2995 *s && (*s++ != Meta || *s++ != 32); len_value++);
(gdb) backtrace
#0 mkenvstr (name=0x139d68 "opt_args", value=0x0, flags=4112) at params.c:2995
#1 0x46ce0 in addenv_internal (name=0x139d68 "opt_args", value=0x0,
flags=4112, add=1) at params.c:2950
#2 0x46e3c in addenv (name=0x139d68 "opt_args", value=0x0, flags=4112)
at params.c:3013
#3 0x449f8 in export_param (pm=0x111918) at params.c:1498
#4 0x45d18 in unsetparam_pm (pm=0x10d4e8, altflag=1120536, exp=902144)
at params.c:2055
#5 0x472d0 in scanendscope (hn=0x10d4e8, flags=0) at params.c:3200
#6 0x2969c in scanhashtable (ht=0xe2fa0, sorted=0, flags1=0, flags2=0,
scanfunc=0x4717c <scanendscope>, scanflags=0) at hashtable.c:403
#7 0x47174 in endparamscope () at params.c:3144
#8 0x23694 in runshfunc (prog=0x116330, wrap=0x0, name=0x100828 "_rpm")
at exec.c:3444
#9 0x77090 in comp_wrapper (prog=0x116330, w=0x0, name=0x100828 "_rpm")
at complete.c:1223
#10 0x23610 in runshfunc (prog=0x116330, wrap=0xcfd40, name=0x100828 "_rpm")
at exec.c:3430
#11 0x234a4 in doshfunc (name=0x10d760 "_rpm", prog=0x116330,
doshargs=0x13fda0, flags=0, noreturnval=0) at exec.c:3375
#12 0x22fe4 in execshfunc (shf=0x139cd8, args=0x1007e8) at exec.c:3184
#13 0x21108 in execcmd (state=0xefff9438, input=0, output=0, how=18, last1=2)
at exec.c:2269
:
:
:
#145 0x1e658 in execpline2 (state=0xefffe9c0, pcode=294, how=2, input=0,
output=0, last1=0) at exec.c:1185
#146 0x1dbdc in execpline (state=0xefffe9c0, slcode=899072, how=2, last1=0)
at exec.c:978
#147 0x1d6fc in execlist (state=0xefffe9c0, dont_change_job=1, exiting=0)
at exec.c:823
#148 0x39bb4 in execfor (state=0xefffe9c0, do_exec=0) at loop.c:140
#149 0x20f4c in execcmd (state=0xefffe9c0, input=0, output=0, how=2, last1=2)
at exec.c:2228
#150 0x1e658 in execpline2 (state=0xefffe9c0, pcode=256, how=2, input=0,
output=0, last1=0) at exec.c:1185
#151 0x1dbdc in execpline (state=0xefffe9c0, slcode=899072, how=2, last1=0)
at exec.c:978
#152 0x1d6fc in execlist (state=0xefffe9c0, dont_change_job=1, exiting=0)
at exec.c:823
#153 0x1d400 in execode (p=0xe1480, dont_change_job=1, exiting=0) at exec.c:729
#154 0x23684 in runshfunc (prog=0xe1480, wrap=0x0,
name=0xfcb88 "_main_complete") at exec.c:3442
#155 0x77090 in comp_wrapper (prog=0xe1480, w=0x0,
name=0xfcb88 "_main_complete") at complete.c:1223
#156 0x23610 in runshfunc (prog=0xe1480, wrap=0xcfd40,
name=0xfcb88 "_main_complete") at exec.c:3430
#157 0x234a4 in doshfunc (name=0x116460 "_main_complete", prog=0xe1480,
doshargs=0x0, flags=0, noreturnval=0) at exec.c:3375
#158 0x78f1c in callcompfunc (s=0xe3c50 "", fn=0x116460 "_main_complete")
at compcore.c:774
#159 0x795c0 in makecomplist (s=0x142da8 "/", incmd=1, lst=905216)
at compcore.c:924
#160 0x77b28 in do_completion (dummy=0x0, dat=0x2) at compcore.c:342
#161 0x40614 in runhookdef (h=0xd318c, d=0xefffeee8) at module.c:1835
#162 0xa9438 in docompletion (s=0x142da8 "/", lst=0, incmd=0)
at zle_tricky.c:1729
#163 0xa6f3c in docomplete (lst=0) at zle_tricky.c:774
#164 0xa5c50 in expandorcomplete (args=0xdd400) at zle_tricky.c:282
#165 0xa58c4 in completecall (args=0xd3108) at zle_tricky.c:176
#166 0x9ce1c in execzlefunc (func=0xd10c4, args=0xd3108) at zle_main.c:655
#167 0x9ca50 in zleread (lp=0xeffff148 "", rp=0xdc400 "", flags=902144)
at zle_main.c:567
#168 0x32020 in inputline () at input.c:265
#169 0x31ee0 in ingetc () at input.c:210
#170 0x2b330 in ihgetc () at hist.c:236
#171 0x3697c in gettok () at lex.c:628
#172 0x36110 in yylex () at lex.c:344
#173 0x47e98 in parse_event () at parse.c:425
#174 0x2f60c in loop (toplevel=1, justonce=0) at init.c:123
#175 0x31bd8 in zsh_main (argc=2, argv=0x1) at init.c:1197
#176 0x121d4 in main (argc=2, argv=0xeffff63c) at ./main.c:37
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: coredump on dev-7 (ALL_EXPORT)
2000-11-25 16:08 coredump on dev-7 (ALL_EXPORT) Naoki Wakamatsu
@ 2000-11-25 18:03 ` Thomas Köhler
2000-11-25 19:07 ` PATCH: " Bart Schaefer
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Köhler @ 2000-11-25 18:03 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
On Sun, Nov 26, 2000 at 01:08:28AM +0900,
Naoki Wakamatsu <m5032106@u-aizu.ac.jp> wrote:
> Zsh-dev-7 generates core file by executing as follows:
>
> (On Linux-2.2.14 or Solaris2.6)
> % zsh -f
> % autoload -U compinit; compinit
> % setopt ALL_EXPORT
> % sudo rpm /[TAB]
> zsh: 17285 segmentation fault (core dumped) zsh -f
Confirmed on Debian GNU/Linux woody (Kernel 2.2.17)
Ciao,
Thomas
--
Thomas Köhler Email: jean-luc@picard.franken.de | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* PATCH: Re: coredump on dev-7 (ALL_EXPORT)
2000-11-25 16:08 coredump on dev-7 (ALL_EXPORT) Naoki Wakamatsu
2000-11-25 18:03 ` Thomas Köhler
@ 2000-11-25 19:07 ` Bart Schaefer
2000-11-25 23:53 ` Ksh emulation and the new completion system Bart Schaefer
1 sibling, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2000-11-25 19:07 UTC (permalink / raw)
To: Naoki Wakamatsu, zsh-workers
The completion system definitely should not use ALL_EXPORT.
The real problem, however, is that arrays and hashes can't be exported.
I've stubbed in some #if 0 code to handle ksh-style array export as was
discussed way back in zsh-workers/9576 and related messages, but there
are a number of other places that check for arrays or hashes and either
skip calling export_param or don't set the PM_EXPORTED flag, and I don't
have time to conduct a thorough search or testing pass for all of them.
Index: Completion/Core/compinit
===================================================================
@@ -134,6 +134,7 @@
NO_shglob
NO_ksharrays
NO_cshnullglob
+ NO_allexport
)
# These can hold names of functions that are to be called before/after all
Index: Src/params.c
===================================================================
@@ -1484,7 +1484,19 @@
{
char buf[(sizeof(zlong) * 8) + 4], *val;
- if (PM_TYPE(pm->flags) == PM_INTEGER)
+ if (PM_TYPE(pm->flags) & (PM_ARRAY|PM_HASHED)) {
+#if 0 /* Requires changes elsewhere in params.c and builtin.c */
+ if (emulation == EMULATE_KSH /* isset(KSHARRAYS) */) {
+ struct value v;
+ v.isarr = 1;
+ v.inv = 0;
+ v.start = 0;
+ v.end = -1;
+ val = getstrvalue(&v);
+ } else
+#endif
+ return;
+ } else if (PM_TYPE(pm->flags) == PM_INTEGER)
convbase(val = buf, pm->gets.ifn(pm), pm->ct);
else if (pm->flags & (PM_EFLOAT|PM_FFLOAT))
val = convfloat(pm->gets.ffn(pm), pm->ct,
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-11-25 23:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-25 16:08 coredump on dev-7 (ALL_EXPORT) Naoki Wakamatsu
2000-11-25 18:03 ` Thomas Köhler
2000-11-25 19:07 ` PATCH: " Bart Schaefer
2000-11-25 23:53 ` Ksh emulation and the new completion system 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).