Bug 4823 - Segmentation fault при выборе большинства поставляемых prompt
: Segmentation fault при выборе большинства поставляемых prompt
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/zsh)
: unstable
: all Linux
: P2 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2004-07-18 17:44 by
Modified: 2005-07-13 15:46 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-07-18 17:44:30
После очередного обновления несколько месяцев назад в zsh проявился глюк
(вероятно, связано с обновлением glibc ): при выборе практически всех идущих в
пакете prompt он падает в segfault. Например, prompt elite2 и прочее. Работает
всего несколько, например clint.
------- Comment #1 From 2004-08-17 07:32:19 -------
$ autoload -U promptinit;promptinit prompt elite2
$ prompt elite2
(at@solemn)(10241/pts)(07:31am:08/17/04)-
(%:~)- rpm -q zsh
zsh-4.2.0-alt1
(at@solemn)(10242/pts)(07:31am:08/17/04)-
(%:~)-
------- Comment #2 From 2004-08-23 19:35:44 -------
У меня подтверждается.
zsh-4.2.0-alt1
------- Comment #3 From 2004-08-23 20:32:09 -------
подтверждается при настройках zsh по умолчанию, zsh-4.2.0-alt1

strace: 
mprotect(0x400000, 135168, PROT_READ|PROT_WRITE) = 0
mmap2(NULL, 2684358656, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= -1 ENOMEM (Cannot allocate memory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

ltrace: 
strcmp("OSTYPE", "BAUD")                          = 13
strcmp("BAUD", "BAUD")                            = 0
strcmp("prompt_themes", "KEYTIMEOUT")             = 37
strcmp("KEYTIMEOUT", "KEYTIMEOUT")                = 0
strcmp("HOST", "HOST")                            = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
------- Comment #4 From 2004-08-26 14:14:30 -------
dmi% autoload -U promptinit
dmi% promptinit
dmi%  prompt -p

adam1 theme:
dmi@dmi ~ % command arg1 arg2 ... argn

adam2 theme:
.-(~)-------------------------------------------------------------------------------------(dmi@dmi)-
`--> command arg1 arg2 ... argn

bart theme:
Segmentation fault
------- Comment #5 From 2004-08-26 16:15:23 -------
strace:

mmap2(NULL, 167936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40226000
mremap(0x40226000, 167936, 331776, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 331776, 659456, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 659456, 1314816, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 1314816, 2625536, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 2625536, 5246976, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 5246976, 10489856, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 10489856, 20975616, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 20975616, 41947136, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 41947136, 83890176, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 83890176, 167776256, MREMAP_MAYMOVE) = 0x40226000
mremap(0x40226000, 167776256, 335548416, MREMAP_MAYMOVE) = -1 ENOMEM (Cannot 
allocate memory)
mmap2(NULL, 335548416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
-1 ENOMEM (Cannot allocate mem
ory)
brk(0)                                  = 0x81d0000
brk(0x1c1d7000)                         = 0x81d0000
mmap2(NULL, 335679488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
-1 ENOMEM (Cannot allocate mem
ory)
mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) 
= 0x72249000
munmap(0x72249000, 749568)              = 0
munmap(0x72400000, 299008)              = 0
mprotect(0x72300000, 135168, PROT_READ|PROT_WRITE) = 0
mmap2(NULL, 335548416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
-1 ENOMEM (Cannot allocate mem
ory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---


ltrace:

strcmp("OSTYPE", "BAUD")                          = 13
strcmp("BAUD", "BAUD")                            = 0
strcmp("prompt_themes", "KEYTIMEOUT")             = 37
strcmp("KEYTIMEOUT", "KEYTIMEOUT")                = 0
strcmp("HOST", "HOST")                            = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
------- Comment #6 From 2004-08-29 13:55:17 -------
(gdb) bt
#0  0x080a5da5 in ztrftime ()
#1  0x08099059 in promptexpand ()
#2  0x080983b0 in promptexpand ()
#3  0x401dda7f in zleread () from /usr/lib/zsh/zle.so
#4  0x08076641 in ingetc ()
#5  0x080763f1 in ingetc ()
#6  0x0806f08e in iaddtoline ()
#7  0x0807bb96 in gettok ()
#8  0x0807b585 in yylex ()
#9  0x0808ec47 in parse_event ()
#10 0x00000000 in ?? ()
------- Comment #7 From 2004-08-30 08:08:56 -------
После обновления до 4.2.1-alt1 падения прекратились.
------- Comment #8 From 2005-01-15 03:21:13 -------
Тогда fixed.