Package: perl
Version: 5.8.7-8
Severity: normal

This is the beginning of Perl_magic_get in the perl-5.8.7 I compiled
myself:

   Dump of assembler code for function Perl_magic_get:
   0x000000000047dee0 <Perl_magic_get+0>:  mov    %r12,0xfffffffffffffff0(%rsp)
   0x000000000047dee5 <Perl_magic_get+5>:  mov    %rbx,0xffffffffffffffe0(%rsp)
   0x000000000047deea <Perl_magic_get+10>: mov    %rdi,%r12
   0x000000000047deed <Perl_magic_get+13>: mov    %rbp,0xffffffffffffffe8(%rsp)
   0x000000000047def2 <Perl_magic_get+18>: mov    %r13,0xfffffffffffffff8(%rsp)
   0x000000000047def7 <Perl_magic_get+23>: sub    $0xa8,%rsp

The last lien allocates 168 byte sof local variable space on the stack.

This is the beginning of Perl_magic_get in debians (debug)perl on the same
system:

   0x00000000004aaf61 <Perl_magic_get+0>:  push   %rbp
   0x00000000004aaf62 <Perl_magic_get+1>:  mov    %rsp,%rbp
   0x00000000004aaf65 <Perl_magic_get+4>:  push   %r12
   0x00000000004aaf67 <Perl_magic_get+6>:  push   %rbx
   0x00000000004aaf68 <Perl_magic_get+7>:  sub    $0x40150,%rsp

This allocates 262480 bytes(!) (in words: a quarter megabyte) of local
variables on the stack.

The problem is that for thread stacks, you don't want to allocate
a megatbyte or so of stack for each thread (or even coroutine), not even
if it's only virtual memory (page tables cost a lot).

Obviously, perl can work with less than 256 bytes in Perl_magic_get, but
in the debian binary, it uses much much more.

This might be a problem with the compiler (I compiled with gcc-3.4) or the
fact that my own perl doesn't have the windows thread emulation enabled.

My perl configuration script ist attached.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.14
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages perl depends on:
hi  libc6                         2.3.5-8.1  GNU C Library: Shared libraries an
ii  libdb4.3                      4.3.29-1   Berkeley v4.3 Database Libraries [
ii  libgdbm3                      1.8.3-2    GNU dbm database routines (runtime
ii  perl-base                     5.8.7-8    The Pathologically Eclectic Rubbis
ii  perl-modules                  5.8.7-8    Core Perl modules

Versions of packages perl recommends:
ii  perl-doc                      5.8.7-8    Perl documentation

-- no debconf information

Attachment: Configure64.sh.txt
Description: application/shellscript

Reply via email to