Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.9k stars 541 forks source link

SIGSEGV in perl 5.8.0 multithread build with -DLEAKTEST #5922

Closed p5pRT closed 21 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#17197 (status was 'resolved')

Searchable as RT17197$

p5pRT commented 22 years ago

From DL-pdsupport@ubsw.com

This is a bug report for perl from DL-pdsupport@​ubsw.com\, generated with the help of perlbug 1.34 running under perl v5.8.0.

Hi\,

I am getting a SIGSEGV\, Segmentation fault\, from miniperl during the build of perl 5.8.0 when I have these build options​:

sh Configure \ -Dprefix='/tmp/perl/5.8.0-mt-debug' \ -Dprivlib='/tmp/perl/5.8.0-mt-debug/lib' \ -Darchlib='/tmp/perl/5.8.0-mt-debug/lib' \ -Dsitelib='/tmp/perl/5.8.0-mt-debug/lib' \ -Dsitearch='/tmp/perl/5.8.0-mt-debug/lib' \ -Dlocincpth='/sbcimp/run/pd/gdbm/1.8.0/include' \ -Dloclibpth='/sbcimp/run/pd/gdbm/1.8.0/lib' \ -Dcc=gcc \ -Dusethreads \ -Uinstallusrbinperl \ -Dperladmin='dl-pdsupport@​ubsw.com' \ -Dcf_email='dl-pdsupport@​ubsw.com' \ -Dccflags='-DLEAKTEST' \ -Doptimize='-g' \ -des

The build is successful if 1> -Dccflags='-DLEAKTEST' is removed or 2> -Dusethreads is removed i.e. it's the combination of multi thread + DLEAKTEST which is giving grief.

I'm building on Solaris 2.6​:   SunOS 5.6 Generic_105181-30 sun4u sparc SUNW\,Ultra-Enterprise

I'm building with gcc 3.1​:   gcc -v   Reading specs from /sbcimp/run/pd/gcc/3.1/lib/gcc-lib/sparc-sun-solaris2.6/3.1/specs   Configured with​: /sbcimp/build/pd/gcc/gcc-3.1/configure --prefix=/sbcimp/run/pd/gcc/3.1 --enable-languages=c++ --enable-threads=solaris   Thread model​: solaris   gcc version 3.1

The build error comes here​:   cp op.c opmini.c   `sh cflags "optimize='-g'" opmini.o` -DPERL_EXTERNAL_GLOB opmini.c   CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -DLEAKTEST -DDEBUGGING -fno-strict-aliasing -I/sbcimp/run/pd/gdbm/1.8.0/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -Wall   rm -f opmini.c   gcc -L/sbcimp/run/pd/gdbm/1.8.0/lib -o miniperl \   miniperlmain.o opmini.o libperl.a -lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc   ./miniperl -w -Ilib -MExporter -e '\<?>' || make minitest   Segmentation Fault - core dumped

Running the miniperl thru gdb shows​:

ln4d419cmp> gdb ./miniperl GNU gdb 5.2.1 Copyright 2002 Free Software Foundation\, Inc. GDB is free software\, covered by the GNU General Public License\, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.6"... (gdb) run Starting program​: /tmp/perl-5.8.0-mt-debug/miniperl [New LWP 1] [New LWP 2] [New LWP 3]

Program received signal SIGSEGV\, Segmentation fault. 0x000abaa0 in Perl_safexmalloc (x=31337\, size=344) at util.c​:221 221 xycount[x][SIZE_TO_Y(size)]++; (gdb) bt #0 0x000abaa0 in Perl_safexmalloc (x=31337\, size=344) at util.c​:221 #1 0x000c0b30 in Perl_reentrant_init (my_perl=0x210180) at reentr.c​:143 #2 0x00046200 in perl_construct (my_perl=0x211ceb) at perl.c​:275 #3 0x00025c0c in main (argc=1\, argv=0xeffffcb4\, env=0xeffffcbc)   at miniperlmain.c​:79

I'm not sure if this is a bug. Maybe -D_REENTRANT -DLEAKTEST aren't meant to work together ? Anyway\, I'm reporting it in case there's an easy fix.

Regards Judith dl-pdsupport@​ubsw.com


Flags​:   category=install   severity=low


Site configuration information for perl v5.8.0​:

Configured by judithp at Thu Sep 12 12​:52​:10 BST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​:   Platform​:   osname=solaris\, osvers=2.6\, archname=sun4-solaris-thread-multi   uname='sunos ln4d419cmp 5.6 generic_105181-30 sun4u sparc sunw\,ultra-enterprise '   config_args='-Dprefix=/tmp/perl/5.8.0-mt-debug -Dprivlib=/tmp/perl/5.8.0-mt-debug/lib -Darchlib=/tmp/perl/5.8.0-mt-debug/lib -Dsitelib=/tmp/perl/5.8.0-mt-debug/lib -Dsitearch=/tmp/perl/5.8.0-mt-debug/lib -Dlocincpth=/sbcimp/run/pd/gdbm/1.8.0/include -Dloclibpth=/sbcimp/run/pd/gdbm/1.8.0/lib -Dcc=gcc -Dusethreads -Uinstallusrbinperl -Dperladmin=dl-pdsupport@​ubsw.com -Dcf_email=dl-pdsupport@​ubsw.com -Doptimize=-g -des'   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=define use5005threads=undef useithreads=define usemultiplicity=define   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=undef use64bitall=undef uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='gcc'\, ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/sbcimp/run/pd/gdbm/1.8.0/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,   optimize='-g'\,   cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/sbcimp/run/pd/gdbm/1.8.0/include'   ccversion=''\, gccversion='3.1'\, gccosandvers='solaris2.6'   intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=4321   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=8\, prototype=define   Linker and Libraries​:   ld='gcc'\, ldflags =' -L/sbcimp/run/pd/gdbm/1.8.0/lib '   libpth=/sbcimp/run/pd/gdbm/1.8.0/lib /usr/lib /usr/ccs/lib   libs=-lsocket -lnsl -lgdbm -ldl -lm -lposix4 -lpthread -lc   perllibs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc   libc=/lib/libc.so\, so=so\, useshrplib=false\, libperl=libperl.a   gnulibc_version=''   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' '   cccdlflags='-fPIC'\, lddlflags='-G -L/sbcimp/run/pd/gdbm/1.8.0/lib'

Locally applied patches​:  


@​INC for perl v5.8.0​:   /tmp/perl/5.8.0-mt-debug/lib   /tmp/perl/5.8.0-mt-debug/lib   /tmp/perl/5.8.0-mt-debug/lib   /tmp/perl/5.8.0-mt-debug/lib   .


Environment for perl v5.8.0​:   HOME=/sbclocal/sca   LANG (unset)   LANGUAGE (unset)   LD_LIBRARY_PATH=/sbcimp/run/pd/gdbm/1.8.0/lib   LOGDIR (unset)   PATH=/tmp/perl/5.8.0-mt-debug/bin​:/sbcimp/run/pd/gcc/3.1/bin​:/sbin​:/usr/sbin​:/bin​:/usr/ccs/bin​:/usr/openwin/bin​:/usr/dt/bin​:/sbcimp/run/pd/gnutar/1.12/bin​:/sbcimp/run/pd/gzip/1.2.4/bin   PERL_BADLANG (unset)   SHELL=/usr/bin/ksh

Visit our website at http​://www.ubswarburg.com

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate\, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted\, corrupted\, lost\, destroyed\, arrive late or incomplete\, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.

p5pRT commented 22 years ago

From Damian.Cass@ubsw.com

I am out of the office attending a coarse from the 9th September through 13th September.

For urgent issues please contact the SCA team on 85024 or raise a GRS request.

Visit our website at http​://www.ubswarburg.com

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate\, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted\, corrupted\, lost\, destroyed\, arrive late or incomplete\, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.

p5pRT commented 22 years ago

From @doughera88

On 12 Sep 2002\, Dl-Pdsupport@​Ubsw.Com wrote​:

I am getting a SIGSEGV\, Segmentation fault\, from miniperl during the build of perl 5.8.0 when I have these build options​:

i.e. it's the combination of multi thread + DLEAKTEST which is giving grief.

I'm not sure if this is a bug. Maybe -D_REENTRANT -DLEAKTEST aren't meant to work together ? Anyway\, I'm reporting it in case there's an easy fix.

Last I checked\, LEAKTEST didn't really work in any case\, and has not really been suppoted since before version 5.000. (Occasionally someone fixes things up to make it work\, but usually it gets broken again shortly thereafter.) Instead\, we recommend various third-party leak testers\, such as Purify or third degree.

--   Andy Dougherty doughera@​lafayette.edu

p5pRT commented 22 years ago

From @tux

On Fri 13 Sep 2002 01​:51\, Andy Dougherty \doughera@&#8203;lafayette\.edu wrote​:

On 12 Sep 2002\, Dl-Pdsupport@​Ubsw.Com wrote​:

I am getting a SIGSEGV\, Segmentation fault\, from miniperl during the build of perl 5.8.0 when I have these build options​:

i.e. it's the combination of multi thread + DLEAKTEST which is giving grief.

I'm not sure if this is a bug. Maybe -D_REENTRANT -DLEAKTEST aren't meant to work together ? Anyway\, I'm reporting it in case there's an easy fix.

Last I checked\, LEAKTEST didn't really work in any case\, and has not really been suppoted since before version 5.000. (Occasionally someone fixes things up to make it work\, but usually it gets broken again shortly thereafter.) Instead\, we recommend various third-party leak testers\, such as Purify or third degree.

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

If we don't use it ourselves\, and we have no value for it\, and valuable - free - third party tools (valgrind) are available\, why still keep it in?

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @doughera88

On Fri\, 13 Sep 2002\, H.Merijn Brand wrote​:

On Fri 13 Sep 2002 01​:51\, Andy Dougherty \doughera@&#8203;lafayette\.edu wrote​:

Last I checked\, LEAKTEST didn't really work in any case\, and has not really been suppoted since before version 5.000. (Occasionally someone fixes things up to make it work\, but usually it gets broken again shortly thereafter.) Instead\, we recommend various third-party leak testers\, such as Purify or third degree.

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

It is not "supported" in Configure -- it's not even mentioned. It's not "supported" in INSTALL -- it's not even mentioned. Odd\, though\, that someone added it to perlrun\, even though the below comment in handy.h is unchanged from 6 years ago​:

  XXX LEAKTEST doesn't really work in perl5. There are direct calls to   safemalloc() in the source\, so LEAKTEST won't pick them up.   (The main "offenders" are extensions.)   Further\, if you try LEAKTEST\, you'll also end up calling   Safefree\, which might call safexfree() on some things that weren't   malloced with safexmalloc. The correct "fix" to this\, if anyone   is interested\, is to ensure that all calls go through the New and   Renew macros.   --Andy Dougherty August 1996

It just never seemed worth the effort to go in and rip it out. It could potentially be made useful\, I suppose\, but for now I think LEAKTEST should be removed from perlrun.pod.

  Andy Dougherty doughera@​lafayette.edu

p5pRT commented 22 years ago

From cjwatson@flatline.org.uk

On Fri\, Sep 13\, 2002 at 08​:51​:17AM -0400\, Andy Dougherty wrote​:

XXX LEAKTEST doesn't really work in perl5. There are direct calls to safemalloc() in the source\, so LEAKTEST won't pick them up. (The main "offenders" are extensions.) Further\, if you try LEAKTEST\, you'll also end up calling Safefree\, which might call safexfree() on some things that weren't malloced with safexmalloc. The correct "fix" to this\, if anyone is interested\, is to ensure that all calls go through the New and Renew macros. --Andy Dougherty August 1996

It just never seemed worth the effort to go in and rip it out. It could potentially be made useful\, I suppose\, but for now I think LEAKTEST should be removed from perlrun.pod.

It's also implied by the discussion of the -DL switch in perldebguts.pod; I got misled by that last week into trying to make -DLEAKTEST work\, before realizing it was too much of a blind alley.

-- Colin Watson [cjwatson@​flatline.org.uk]

p5pRT commented 22 years ago

From @doughera88

On Fri\, 13 Sep 2002\, Colin Watson wrote​:

On Fri\, Sep 13\, 2002 at 08​:51​:17AM -0400\, Andy Dougherty wrote​:

XXX LEAKTEST doesn't really work in perl5. There are direct calls to safemalloc() in the source\, so LEAKTEST won't pick them up. (The main "offenders" are extensions.)

It just never seemed worth the effort to go in and rip it out. It could potentially be made useful\, I suppose\, but for now I think LEAKTEST should be removed from perlrun.pod.

It's also implied by the discussion of the -DL switch in perldebguts.pod; I got misled by that last week into trying to make -DLEAKTEST work\, before realizing it was too much of a blind alley.

Well\, it clearly did work for someone (Ilya?) at least in some situations for a while. (It may all also have been very dependent upon whether or not perl's malloc or the system malloc was being used\, and whether or not EMBED_MY_MALLOC was or was not in force.) I suspect it's even more confused with threads. (At one point\, the threads extension actually called plain raw 'malloc()' directly\, bypassing both the New() interface and the safemalloc() interface. I haven't checked lately to see what's up.)

This sort of thing has always been the state with LEAKTEST. It almost works\, so it seems a shame to rip it out\, but it doesn't quite work.

--   Andy Dougherty doughera@​lafayette.edu   Dept. of Physics   Lafayette College\, Easton PA 18042

p5pRT commented 22 years ago

From nick@ing-simmons.net

Dl-Pdsupport@​Ubsw.Com \perl5\-porters@&#8203;perl\.org writes​:

# New Ticket Created by DL-pdsupport@​ubsw.com # Please include the string​: [perl #17197] # in the subject line of all future correspondence about this issue. # \<URL​: http​://rt.perl.org/rt2/Ticket/Display.html?id=17197 >

This is a bug report for perl from DL-pdsupport@​ubsw.com\, generated with the help of perlbug 1.34 running under perl v5.8.0.

Hi\,

I am getting a SIGSEGV\, Segmentation fault\, from miniperl during the build of perl 5.8.0 when I have these build options​:

The build is successful if 1> -Dccflags='-DLEAKTEST' is removed or 2> -Dusethreads is removed i.e. it's the combination of multi thread + DLEAKTEST which is giving grief.

Program received signal SIGSEGV\, Segmentation fault. 0x000abaa0 in Perl_safexmalloc (x=31337\, size=344) at util.c​:221 221 xycount[x][SIZE_TO_Y(size)]++; (gdb) bt #0 0x000abaa0 in Perl_safexmalloc (x=31337\, size=344) at util.c​:221 #1 0x000c0b30 in Perl_reentrant_init (my_perl=0x210180) at reentr.c​:143 #2 0x00046200 in perl_construct (my_perl=0x211ceb) at perl.c​:275 #3 0x00025c0c in main (argc=1\, argv=0xeffffcb4\, env=0xeffffcbc) at miniperlmain.c​:79

I'm not sure if this is a bug. Maybe -D_REENTRANT -DLEAKTEST aren't meant to work together ? Anyway\, I'm reporting it in case there's an easy fix.

I don't think anyone has been maintaining the -DLEAKTEST stuff for a year or three. These days we tend to diagnose leaks with valgrind/purify rather than LEAKTEST's clever #fdefine hackery​:

handy.h​: XXX LEAKTEST doesn't really work in perl5. There are direct calls to handy.h​: safemalloc() in the source\, so LEAKTEST won't pick them up.

-- Nick Ing-Simmons http​://www.ni-s.u-net.com/

p5pRT commented 22 years ago

From nick@ing-simmons.net

H.Merijn Brand \h\.m\.brand@&#8203;hccnet\.nl writes​:

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

If we don't use it ourselves\, and we have no value for it\, and valuable - free - third party tools (valgrind) are available\, why still keep it in?

I vote for removing it. One less #define forest to fight through.

-- Nick Ing-Simmons http​://www.ni-s.u-net.com/

p5pRT commented 22 years ago

From nick@ing-simmons.net

Andy Dougherty \doughera@&#8203;lafayette\.edu writes​:

I suspect it's even more confused with threads. (At one point\, the threads extension actually called plain raw 'malloc()' directly\, bypassing both the New() interface and the safemalloc() interface. I haven't checked lately to see what's up.)

The direct use of malloc() was to bypass Win32's per-thread-pool scheme to try and allocate data global to all threads. I _think_ that should have been backed out now in favour of threads​::shared and "proper" sv_dup() "cloning".

This sort of thing has always been the state with LEAKTEST. It almost works\, so it seems a shame to rip it out\, but it doesn't quite work. -- Nick Ing-Simmons http​://www.ni-s.u-net.com/

p5pRT commented 22 years ago

From @eserte

Nick Ing-Simmons \nick@&#8203;ing\-simmons\.net writes​:

H.Merijn Brand \h\.m\.brand@&#8203;hccnet\.nl writes​:

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

If we don't use it ourselves\, and we have no value for it\, and valuable - free - third party tools (valgrind) are available\, why still keep it in?

I vote for removing it. One less #define forest to fight through.

What about the systems without purify (I assume it's commercial) and valgrind (only for Linux/i386)?

Regards\,   Slaven

-- Slaven Rezic - slaven.rezic@​berlin.de   babybike - routeplanner for cyclists in Berlin   handheld (e.g. Compaq iPAQ with Linux) version of bbbike   http​://bbbike.sourceforge.net

p5pRT commented 22 years ago

From nick@ing-simmons.net

Slaven Rezic \slaven\.rezic@&#8203;berlin\.de writes​:

Nick Ing-Simmons \nick@&#8203;ing\-simmons\.net writes​:

H.Merijn Brand \h\.m\.brand@&#8203;hccnet\.nl writes​:

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

If we don't use it ourselves\, and we have no value for it\, and valuable - free - third party tools (valgrind) are available\, why still keep it in?

I vote for removing it. One less #define forest to fight through.

What about the systems without purify (I assume it's commercial) and valgrind (only for Linux/i386)?

Well broadly speaking memory leaks are platform independant\, so we can find them on one that does. Personally I think a debugging malloc (tweaked version of perl's malloc ?) would be at least as good as LEAKTEST.

However if you want to side with Andy and leave it in that is okay too.

-- Nick Ing-Simmons http​://www.ni-s.u-net.com/

p5pRT commented 22 years ago

From @nwc10

On Sun\, Sep 15\, 2002 at 09​:35​:42PM +0200\, Slaven Rezic wrote​:

[removing -DLEAKTEST]

What about the systems without purify (I assume it's commercial) and valgrind (only for Linux/i386)?

If you use google you can detect some message to a list about a FreeBSD guy working on a port sometime back in February\, but sadly nothing further seems to have happened.

I see no reason why valgrind could not be extended to any other CPU architecture if someone were brave enough to implement the code to translate its instructions to and from valgrind's internal representation.

Nicholas Clark -- Even better than the real thing​: http​://nms-cgi.sourceforge.net/

p5pRT commented 22 years ago

From @tux

On Sun 15 Sep 2002 21​:35\, Slaven Rezic \slaven\.rezic@&#8203;berlin\.de wrote​:

Nick Ing-Simmons \nick@&#8203;ing\-simmons\.net writes​:

H.Merijn Brand \h\.m\.brand@&#8203;hccnet\.nl writes​:

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

If we don't use it ourselves\, and we have no value for it\, and valuable - free - third party tools (valgrind) are available\, why still keep it in?

I vote for removing it. One less #define forest to fight through.

What about the systems without purify (I assume it's commercial) and valgrind (only for Linux/i386)?

The chances that LEAKTEST will be changed to *work* on those systems is problably about the same to the chance that valgrind is ported to such system

A *very* cheap solution might be to just link with the debugging version of GNU malloc\, but IIRC\, that ain't maintained anymore either.

Bottom line is that the code in there now is useless\, and there's no signals that it is to be made useful in the (near) future.

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @doughera88

On Sun\, 15 Sep 2002\, Nick Ing-Simmons wrote​:

However if you want to side with Andy and leave it in that is okay too.

Me? I'm not taking any sides :-)\, just reporting history.

--   Andy Dougherty doughera@​lafayette.edu

p5pRT commented 22 years ago

From @tux

On Sun 15 Sep 2002 12​:14\, Nick Ing-Simmons \nick@&#8203;ing\-simmons\.net wrote​:

H.Merijn Brand \h\.m\.brand@&#8203;hccnet\.nl writes​:

Remove it (with a rusty chainsaw)? Unsupport it from Configure? Undocument it?

If we don't use it ourselves\, and we have no value for it\, and valuable - free - third party tools (valgrind) are available\, why still keep it in?

I vote for removing it. One less #define forest to fight through.

Wrrrmmmmm\, wrmmmmmm\, crrrrrrrrrrrrrrrrrrrrrr LEAKTEST? What LEAKTEST?

Some small remarks.

a. I don't know if I caught the 'L' flag for -DDEBUGGING enough b. I don't know if I included generated files in the patch c. Tests still pass on HP-UX 11.00

Also attached for easier withdraw

Inline Patch ```diff --- av.c 2002-08-17 04:29:52.000000000 +0200 +++ av.c 2002-09-16 15:55:01.000000000 +0200 @@ -105,7 +105,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key) IV itmp; #endif -#if defined(MYMALLOC) && !defined(LEAKTEST) +#ifdef MYMALLOC newmax = malloced_size((void*)AvALLOC(av))/sizeof(SV*) - 1; if (key <= newmax) @@ -134,7 +134,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key) Safefree(AvALLOC(av)); AvALLOC(av) = ary; #endif -#if defined(MYMALLOC) && !defined(LEAKTEST) +#ifdef MYMALLOC resized: #endif ary = AvALLOC(av) + AvMAX(av) + 1; --- embed.h 2002-08-22 13:45:44.000000000 +0200 +++ embed.h 2002-09-16 15:55:41.000000000 +0200 @@ -775,12 +775,6 @@ #define safesyscalloc Perl_safesyscalloc #define safesysrealloc Perl_safesysrealloc #define safesysfree Perl_safesysfree -#if defined(LEAKTEST) -#define safexmalloc Perl_safexmalloc -#define safexcalloc Perl_safexcalloc -#define safexrealloc Perl_safexrealloc -#define safexfree Perl_safexfree -#endif #if defined(PERL_GLOBAL_STRUCT) #define GetVars Perl_GetVars #endif @@ -1182,9 +1176,6 @@ #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) #define closest_cop S_closest_cop #define mess_alloc S_mess_alloc -# if defined(LEAKTEST) -#define xstat S_xstat -# endif #endif #define sv_setsv_flags Perl_sv_setsv_flags #define sv_catpvn_flags Perl_sv_catpvn_flags @@ -2343,12 +2334,6 @@ #define safesyscalloc Perl_safesyscalloc #define safesysrealloc Perl_safesysrealloc #define safesysfree Perl_safesysfree -#if defined(LEAKTEST) -#define safexmalloc Perl_safexmalloc -#define safexcalloc Perl_safexcalloc -#define safexrealloc Perl_safexrealloc -#define safexfree Perl_safexfree -#endif #if defined(PERL_GLOBAL_STRUCT) #define GetVars() Perl_GetVars(aTHX) #endif @@ -2745,9 +2730,6 @@ #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) #define closest_cop(a,b) S_closest_cop(aTHX_ a,b) #define mess_alloc() S_mess_alloc(aTHX) -# if defined(LEAKTEST) -#define xstat(a) S_xstat(aTHX_ a) -# endif #endif #define sv_setsv_flags(a,b,c) Perl_sv_setsv_flags(aTHX_ a,b,c) #define sv_catpvn_flags(a,b,c,d) Perl_sv_catpvn_flags(aTHX_ a,b,c,d) --- ext/GDBM_File/GDBM_File.xs 2002-08-22 13:56:04.000000000 +0200 +++ ext/GDBM_File/GDBM_File.xs 2002-09-16 15:56:22.000000000 +0200 @@ -39,7 +39,7 @@ not_here(char *s) static void output_datum(pTHX_ SV *arg, char *str, int size) { -#if (!defined(MYMALLOC) || (defined(MYMALLOC) && defined(PERL_POLLUTE_MALLOC))) && !defined(LEAKTEST) +#if (!defined(MYMALLOC) || (defined(MYMALLOC) && defined(PERL_POLLUTE_MALLOC))) sv_usepvn(arg, str, size); #else sv_setpvn(arg, str, size); --- handy.h 2002-05-19 03:32:24.000000000 +0200 +++ handy.h 2002-09-16 15:56:59.000000000 +0200 @@ -516,18 +516,6 @@ typedef U16 line_t; /* - XXX LEAKTEST doesn't really work in perl5. There are direct calls to - safemalloc() in the source, so LEAKTEST won't pick them up. - (The main "offenders" are extensions.) - Further, if you try LEAKTEST, you'll also end up calling - Safefree, which might call safexfree() on some things that weren't - malloced with safexmalloc. The correct "fix" to this, if anyone - is interested, is to ensure that all calls go through the New and - Renew macros. - --Andy Dougherty August 1996 -*/ - -/* =head1 SV Manipulation Functions =for apidoc Am|SV*|NEWSV|int id|STRLEN len @@ -589,8 +577,6 @@ hopefully catches attempts to access uni #define NEWSV(x,len) newSV(len) -#ifndef LEAKTEST - #define New(x,v,n,t) (v = (t*)safemalloc((MEM_SIZE)((n)*sizeof(t)))) #define Newc(x,v,n,t,c) (v = (c*)safemalloc((MEM_SIZE)((n)*sizeof(t)))) #define Newz(x,v,n,t) (v = (t*)safemalloc((MEM_SIZE)((n)*sizeof(t)))), \ @@ -601,28 +587,6 @@ hopefully catches attempts to access uni (v = (c*)saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t)))) #define Safefree(d) safefree((Malloc_t)(d)) -#else /* LEAKTEST */ - -#define New(x,v,n,t) (v = (t*)safexmalloc((x),(MEM_SIZE)((n)*sizeof(t)))) -#define Newc(x,v,n,t,c) (v = (c*)safexmalloc((x),(MEM_SIZE)((n)*sizeof(t)))) -#define Newz(x,v,n,t) (v = (t*)safexmalloc((x),(MEM_SIZE)((n)*sizeof(t)))), \ - memzero((char*)(v), (n)*sizeof(t)) -#define Renew(v,n,t) \ - (v = (t*)safexrealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t)))) -#define Renewc(v,n,t,c) \ - (v = (c*)safexrealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t)))) -#define Safefree(d) safexfree((Malloc_t)(d)) - -#define MAXXCOUNT 1400 -#define MAXY_SIZE 80 -#define MAXYCOUNT 16 /* (MAXY_SIZE/4 + 1) */ -extern long xcount[MAXXCOUNT]; -extern long lastxcount[MAXXCOUNT]; -extern long xycount[MAXXCOUNT][MAXYCOUNT]; -extern long lastxycount[MAXXCOUNT][MAXYCOUNT]; - -#endif /* LEAKTEST */ - #define Move(s,d,n,t) (void)memmove((char*)(d),(char*)(s), (n) * sizeof(t)) #define Copy(s,d,n,t) (void)memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) #define Zero(d,n,t) (void)memzero((char*)(d), (n) * sizeof(t)) --- proto.h 2002-08-22 13:45:45.000000000 +0200 +++ proto.h 2002-09-16 15:57:35.000000000 +0200 @@ -894,12 +894,6 @@ PERL_CALLCONV Malloc_t Perl_safesysmallo PERL_CALLCONV Malloc_t Perl_safesyscalloc(MEM_SIZE elements, MEM_SIZE size); PERL_CALLCONV Malloc_t Perl_safesysrealloc(Malloc_t where, MEM_SIZE nbytes); PERL_CALLCONV Free_t Perl_safesysfree(Malloc_t where); -#if defined(LEAKTEST) -PERL_CALLCONV Malloc_t Perl_safexmalloc(I32 x, MEM_SIZE size); -PERL_CALLCONV Malloc_t Perl_safexcalloc(I32 x, MEM_SIZE elements, MEM_SIZE size); -PERL_CALLCONV Malloc_t Perl_safexrealloc(Malloc_t where, MEM_SIZE size); -PERL_CALLCONV void Perl_safexfree(Malloc_t where); -#endif #if defined(PERL_GLOBAL_STRUCT) PERL_CALLCONV struct perl_vars * Perl_GetVars(pTHX); #endif @@ -1343,9 +1337,6 @@ STATIC char* S_stdize_locale(pTHX_ char* #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) STATIC COP* S_closest_cop(pTHX_ COP *cop, OP *o); STATIC SV* S_mess_alloc(pTHX); -# if defined(LEAKTEST) -STATIC void S_xstat(pTHX_ int); -# endif #endif START_EXTERN_C --- sv.c 2002-09-09 13:06:50.000000000 +0200 +++ sv.c 2002-09-16 15:57:58.000000000 +0200 @@ -1126,13 +1126,8 @@ S_more_xpvbm(pTHX) xpvbm->xpv_pv = 0; } -#ifdef LEAKTEST -# define my_safemalloc(s) (void*)safexmalloc(717,s) -# define my_safefree(p) safexfree((char*)p) -#else -# define my_safemalloc(s) (void*)safemalloc(s) -# define my_safefree(p) safefree((char*)p) -#endif +#define my_safemalloc(s) (void*)safemalloc(s) +#define my_safefree(p) safefree((char*)p) #ifdef PURIFY @@ -1578,7 +1573,7 @@ Perl_sv_grow(pTHX_ register SV *sv, regi if (newlen > SvLEN(sv)) { /* need more room? */ if (SvLEN(sv) && s) { -#if defined(MYMALLOC) && !defined(LEAKTEST) +#ifdef MYMALLOC STRLEN l = malloced_size((void*)SvPVX(sv)); if (newlen <= l) { SvLEN_set(sv, l); --- util.c 2002-09-08 19:35:56.000000000 +0200 +++ util.c 2002-09-16 15:58:54.000000000 +0200 @@ -38,15 +38,6 @@ #define FLUSH -#ifdef LEAKTEST - -long xcount[MAXXCOUNT]; -long lastxcount[MAXXCOUNT]; -long xycount[MAXXCOUNT][MAXYCOUNT]; -long lastxycount[MAXXCOUNT][MAXYCOUNT]; - -#endif - #if defined(HAS_FCNTL) && defined(F_SETFD) && !defined(FD_CLOEXEC) # define FD_CLOEXEC 1 /* NeXT needs this */ #endif @@ -189,148 +180,6 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_S /*NOTREACHED*/ } -#ifdef LEAKTEST - -struct mem_test_strut { - union { - long type; - char c[2]; - } u; - long size; -}; - -# define ALIGN sizeof(struct mem_test_strut) - -# define sizeof_chunk(ch) (((struct mem_test_strut*) (ch))->size) -# define typeof_chunk(ch) \ - (((struct mem_test_strut*) (ch))->u.c[0] + ((struct mem_test_strut*) (ch))->u.c[1]*100) -# define set_typeof_chunk(ch,t) \ - (((struct mem_test_strut*) (ch))->u.c[0] = t % 100, ((struct mem_test_strut*) (ch))->u.c[1] = t / 100) -#define SIZE_TO_Y(size) ( (size) > MAXY_SIZE \ - ? MAXYCOUNT - 1 \ - : ( (size) > 40 \ - ? ((size) - 1)/8 + 5 \ - : ((size) - 1)/4)) - -Malloc_t -Perl_safexmalloc(I32 x, MEM_SIZE size) -{ - register char* where = (char*)safemalloc(size + ALIGN); - - xcount[x] += size; - xycount[x][SIZE_TO_Y(size)]++; - set_typeof_chunk(where, x); - sizeof_chunk(where) = size; - return (Malloc_t)(where + ALIGN); -} - -Malloc_t -Perl_safexrealloc(Malloc_t wh, MEM_SIZE size) -{ - char *where = (char*)wh; - - if (!wh) - return safexmalloc(0,size); - - { - MEM_SIZE old = sizeof_chunk(where - ALIGN); - int t = typeof_chunk(where - ALIGN); - register char* new = (char*)saferealloc(where - ALIGN, size + ALIGN); - - xycount[t][SIZE_TO_Y(old)]--; - xycount[t][SIZE_TO_Y(size)]++; - xcount[t] += size - old; - sizeof_chunk(new) = size; - return (Malloc_t)(new + ALIGN); - } -} - -void -Perl_safexfree(Malloc_t wh) -{ - I32 x; - char *where = (char*)wh; - MEM_SIZE size; - - if (!where) - return; - where -= ALIGN; - size = sizeof_chunk(where); - x = where[0] + 100 * where[1]; - xcount[x] -= size; - xycount[x][SIZE_TO_Y(size)]--; - safefree(where); -} - -Malloc_t -Perl_safexcalloc(I32 x,MEM_SIZE count, MEM_SIZE size) -{ - register char * where = (char*)safexmalloc(x, size * count + ALIGN); - xcount[x] += size; - xycount[x][SIZE_TO_Y(size)]++; - memset((void*)(where + ALIGN), 0, size * count); - set_typeof_chunk(where, x); - sizeof_chunk(where) = size; - return (Malloc_t)(where + ALIGN); -} - -STATIC void -S_xstat(pTHX_ int flag) -{ - register I32 i, j, total = 0; - I32 subtot[MAXYCOUNT]; - - for (j = 0; j < MAXYCOUNT; j++) { - subtot[j] = 0; - } - - PerlIO_printf(Perl_debug_log, " Id subtot 4 8 12 16 20 24 28 32 36 40 48 56 64 72 80 80+\n", total); - for (i = 0; i < MAXXCOUNT; i++) { - total += xcount[i]; - for (j = 0; j < MAXYCOUNT; j++) { - subtot[j] += xycount[i][j]; - } - if (flag == 0 - ? xcount[i] /* Have something */ - : (flag == 2 - ? xcount[i] != lastxcount[i] /* Changed */ - : xcount[i] > lastxcount[i])) { /* Growed */ - PerlIO_printf(Perl_debug_log,"%2d %02d %7ld ", i / 100, i % 100, - flag == 2 ? xcount[i] - lastxcount[i] : xcount[i]); - lastxcount[i] = xcount[i]; - for (j = 0; j < MAXYCOUNT; j++) { - if ( flag == 0 - ? xycount[i][j] /* Have something */ - : (flag == 2 - ? xycount[i][j] != lastxycount[i][j] /* Changed */ - : xycount[i][j] > lastxycount[i][j])) { /* Growed */ - PerlIO_printf(Perl_debug_log,"%3ld ", - flag == 2 - ? xycount[i][j] - lastxycount[i][j] - : xycount[i][j]); - lastxycount[i][j] = xycount[i][j]; - } else { - PerlIO_printf(Perl_debug_log, " . ", xycount[i][j]); - } - } - PerlIO_printf(Perl_debug_log, "\n"); - } - } - if (flag != 2) { - PerlIO_printf(Perl_debug_log, "Total %7ld ", total); - for (j = 0; j < MAXYCOUNT; j++) { - if (subtot[j]) { - PerlIO_printf(Perl_debug_log, "%3ld ", subtot[j]); - } else { - PerlIO_printf(Perl_debug_log, " . "); - } - } - PerlIO_printf(Perl_debug_log, "\n"); - } -} - -#endif /* LEAKTEST */ - /* These must be defined when not using Perl's malloc for binary * compatibility */ @@ -1413,14 +1262,6 @@ Perl_vwarn(pTHX_ const char* pat, va_lis PerlIO *serr = Perl_error_log; PERL_WRITE_MSG_TO_CONSOLE(serr, message, msglen); -#ifdef LEAKTEST - DEBUG_L(*message == '!' - ? (xstat(message[1]=='!' - ? (message[2]=='!' ? 2 : 1) - : 0) - , 0) - : 0); -#endif (void)PerlIO_flush(serr); } } @@ -1564,14 +1405,6 @@ Perl_vwarner(pTHX_ U32 err, const char* { PerlIO *serr = Perl_error_log; PERL_WRITE_MSG_TO_CONSOLE(serr, message, msglen); -#ifdef LEAKTEST - DEBUG_L(*message == '!' - ? (xstat(message[1]=='!' - ? (message[2]=='!' ? 2 : 1) - : 0) - , 0) - : 0); -#endif (void)PerlIO_flush(serr); } } --- embed.fnc 2002-08-22 13:45:44.000000000 +0200 +++ embed.fnc 2002-09-16 15:59:09.000000000 +0200 @@ -857,12 +857,6 @@ Anp |Malloc_t|safesysmalloc |MEM_SIZE nb Anp |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size Anp |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes Anp |Free_t |safesysfree |Malloc_t where -#if defined(LEAKTEST) -Anp |Malloc_t|safexmalloc |I32 x|MEM_SIZE size -Anp |Malloc_t|safexcalloc |I32 x|MEM_SIZE elements|MEM_SIZE size -Anp |Malloc_t|safexrealloc |Malloc_t where|MEM_SIZE size -Anp |void |safexfree |Malloc_t where -#endif #if defined(PERL_GLOBAL_STRUCT) Ap |struct perl_vars *|GetVars #endif @@ -1314,9 +1308,6 @@ s |char* |stdize_locale |char* locs #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) s |COP* |closest_cop |COP *cop|OP *o s |SV* |mess_alloc -# if defined(LEAKTEST) -s |void |xstat |int -# endif #endif START_EXTERN_C --- pod/perlrun.pod 2002-08-22 13:45:45.000000000 +0200 +++ pod/perlrun.pod 2002-09-16 15:59:22.000000000 +0200 @@ -320,7 +320,6 @@ B<-D14> is equivalent to B<-Dtls>): 512 r Regular expression parsing and execution 1024 x Syntax tree dump 2048 u Tainting checks - 4096 L Memory leaks (needs -DLEAKTEST when compiling Perl) 8192 H Hash dump -- usurps values() 16384 X Scratchpad allocation 32768 D Cleaning up -- ```

H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @tux

xx.txt

p5pRT commented 22 years ago

From @rgarcia

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

a. I don't know if I caught the 'L' flag for -DDEBUGGING enough

There's a few DEBUG_L* symbols in perl.h that you can wipe out. Update also DEBUG_MASK in this same file.

The code that understands the letters after -D is in perl.c\, around line 2363 :

  static char debopts[] = "psltocPmfrxuLHXDSTRJvC";

p5pRT commented 22 years ago

From @tux

On Mon 16 Sep 2002 16​:48\, Rafael Garcia-Suarez \raphel\.garcia\-suarez@&#8203;hexaflux\.com wrote​:

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

a. I don't know if I caught the 'L' flag for -DDEBUGGING enough

There's a few DEBUG_L* symbols in perl.h that you can wipe out. Update also DEBUG_MASK in this same file.

The code that understands the letters after -D is in perl.c\, around line 2363 :

        static char debopts\[\] = "psltocPmfrxuLHXDSTRJvC";

OK\, grrr\, krack

Inline Patch ```diff --- perl.h 2002-09-09 13:06:50.000000000 +0200 +++ perl.h 2002-09-16 16:59:08.000000000 +0200 @@ -2452,7 +2452,6 @@ Gid_t getegid (void); #define DEBUG_r_FLAG 0x00000200 /* 512 */ #define DEBUG_x_FLAG 0x00000400 /* 1024 */ #define DEBUG_u_FLAG 0x00000800 /* 2048 */ -#define DEBUG_L_FLAG 0x00001000 /* 4096 */ #define DEBUG_H_FLAG 0x00002000 /* 8192 */ #define DEBUG_X_FLAG 0x00004000 /* 16384 */ #define DEBUG_D_FLAG 0x00008000 /* 32768 */ @@ -2462,7 +2461,7 @@ Gid_t getegid (void); #define DEBUG_J_FLAG 0x00080000 /* 524288 */ #define DEBUG_v_FLAG 0x00100000 /*1048576 */ #define DEBUG_C_FLAG 0x00200000 /*2097152 */ -#define DEBUG_MASK 0x003FFFFF /* mask of all the standard flags */ +#define DEBUG_MASK 0x003FEFFF /* mask of all the standard flags */ #define DEBUG_DB_RECURSE_FLAG 0x40000000 #define DEBUG_TOP_FLAG 0x80000000 /* XXX what's this for ??? Signal @@ -2480,7 +2479,6 @@ Gid_t getegid (void); # define DEBUG_r_TEST_ (PL_debug & DEBUG_r_FLAG) # define DEBUG_x_TEST_ (PL_debug & DEBUG_x_FLAG) # define DEBUG_u_TEST_ (PL_debug & DEBUG_u_FLAG) -# define DEBUG_L_TEST_ (PL_debug & DEBUG_L_FLAG) # define DEBUG_H_TEST_ (PL_debug & DEBUG_H_FLAG) # define DEBUG_X_TEST_ (PL_debug & DEBUG_X_FLAG) # define DEBUG_D_TEST_ (PL_debug & DEBUG_D_FLAG) @@ -2508,7 +2506,6 @@ Gid_t getegid (void); # define DEBUG_r_TEST DEBUG_r_TEST_ # define DEBUG_x_TEST DEBUG_x_TEST_ # define DEBUG_u_TEST DEBUG_u_TEST_ -# define DEBUG_L_TEST DEBUG_L_TEST_ # define DEBUG_H_TEST DEBUG_H_TEST_ # define DEBUG_X_TEST DEBUG_X_TEST_ # define DEBUG_D_TEST DEBUG_D_TEST_ @@ -2545,7 +2542,6 @@ Gid_t getegid (void); # define DEBUG_r(a) DEBUG__(DEBUG_r_TEST, a) # define DEBUG_x(a) DEBUG__(DEBUG_x_TEST, a) # define DEBUG_u(a) DEBUG__(DEBUG_u_TEST, a) -# define DEBUG_L(a) DEBUG__(DEBUG_L_TEST, a) # define DEBUG_H(a) DEBUG__(DEBUG_H_TEST, a) # define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a) # define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a) @@ -2575,7 +2571,6 @@ Gid_t getegid (void); # define DEBUG_r_TEST (0) # define DEBUG_x_TEST (0) # define DEBUG_u_TEST (0) -# define DEBUG_L_TEST (0) # define DEBUG_H_TEST (0) # define DEBUG_X_TEST (0) # define DEBUG_D_TEST (0) @@ -2600,7 +2595,6 @@ Gid_t getegid (void); # define DEBUG_r(a) # define DEBUG_x(a) # define DEBUG_u(a) -# define DEBUG_L(a) # define DEBUG_H(a) # define DEBUG_X(a) # define DEBUG_D(a) --- perl-current/perl.c 2002-09-04 16:07:19.000000000 +0200 +++ perl-current/perl.c 2002-09-16 16:57:59.000000000 +0200 @@ -2360,7 +2360,7 @@ Perl_moreswitches(pTHX_ char *s) forbid_setid("-D"); if (isALPHA(s[1])) { /* if adding extra options, remember to update DEBUG_MASK */ - static char debopts[] = "psltocPmfrxuLHXDSTRJvC"; + static char debopts[] = "psltocPmfrxuHXDSTRJvC"; char *d; for (s++; *s && (d = strchr(debopts,*s)); s++) -- ```

H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @rgarcia

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

OK\, grrr\, krack --- perl-current/perl.c 2002-09-04 16​:07​:19.000000000 +0200 +++ perl-current/perl.c 2002-09-16 16​:57​:59.000000000 +0200 @​@​ -2360\,7 +2360\,7 @​@​ Perl_moreswitches(pTHX_ char *s) forbid_setid("-D"); if (isALPHA(s[1])) { /* if adding extra options\, remember to update DEBUG_MASK */ - static char debopts[] = "psltocPmfrxuLHXDSTRJvC"; + static char debopts[] = "psltocPmfrxuHXDSTRJvC";

You're fast\, perhaps too fast. This should be   static char debopts[] = "psltocPmfrxu HXDSTRJvC";

p5pRT commented 22 years ago

From Judith.Pemberton@ubsw.com

Hi\,

I am not in the office today. If your email is for sca or pd work or information\, please either raise a GRS request (GRSWeb -> Software Distribution Services -> SCA) or ask on the #sca-help chat channel.

Thanks Judith

Visit our website at http​://www.ubswarburg.com

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate\, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted\, corrupted\, lost\, destroyed\, arrive late or incomplete\, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.

p5pRT commented 22 years ago

From @rgarcia

Rafael Garcia-Suarez \raphel\.garcia\-suarez@&#8203;hexaflux\.com wrote​:

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

OK\, grrr\, krack --- perl-current/perl.c 2002-09-04 16​:07​:19.000000000 +0200 +++ perl-current/perl.c 2002-09-16 16​:57​:59.000000000 +0200 @​@​ -2360\,7 +2360\,7 @​@​ Perl_moreswitches(pTHX_ char *s) forbid_setid("-D"); if (isALPHA(s[1])) { /* if adding extra options\, remember to update DEBUG_MASK */ - static char debopts[] = "psltocPmfrxuLHXDSTRJvC"; + static char debopts[] = "psltocPmfrxuHXDSTRJvC";

You're fast\, perhaps too fast. This should be static char debopts[] = "psltocPmfrxu HXDSTRJvC";

Your patches (with my correction) build fine and passes all tests here.

And\, by the way\, there should be tests that -D\ and -D\<appropriate combination of letters> do the right thing. I'm just thinking aloud.

p5pRT commented 22 years ago

From @tux

On Mon 16 Sep 2002 18​:03\, Rafael Garcia-Suarez \raphel\.garcia\-suarez@&#8203;hexaflux\.com wrote​:

Rafael Garcia-Suarez \raphel\.garcia\-suarez@&#8203;hexaflux\.com wrote​:

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

OK\, grrr\, krack --- perl-current/perl.c 2002-09-04 16​:07​:19.000000000 +0200 +++ perl-current/perl.c 2002-09-16 16​:57​:59.000000000 +0200 @​@​ -2360\,7 +2360\,7 @​@​ Perl_moreswitches(pTHX_ char *s) forbid_setid("-D"); if (isALPHA(s[1])) { /* if adding extra options\, remember to update DEBUG_MASK */ - static char debopts[] = "psltocPmfrxuLHXDSTRJvC"; + static char debopts[] = "psltocPmfrxuHXDSTRJvC";

You're fast\, perhaps too fast. This should be static char debopts[] = "psltocPmfrxu HXDSTRJvC";

Your patches (with my correction) build fine and passes all tests here.

Feel free to apply. I won't so short before I leave for YAPC :)

And\, by the way\, there should be tests that -D\ and -D\<appropriate combination of letters> do the right thing. I'm just thinking aloud.

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @rgarcia

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

Feel free to apply. I won't so short before I leave for YAPC :)

Have a good time\, all. I'll stay in Lyon -- my day-job configuration makes impossible for me to take some vacation now. :(

p5pRT commented 22 years ago

From @nwc10

On Mon\, Sep 16\, 2002 at 05​:03​:49PM +0200\, H.Merijn Brand wrote​:

On Mon 16 Sep 2002 16​:48\, Rafael Garcia-Suarez \raphel\.garcia\-suarez@&#8203;hexaflux\.com wrote​:

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​:

a. I don't know if I caught the 'L' flag for -DDEBUGGING enough

There's a few DEBUG_L* symbols in perl.h that you can wipe out. Update also DEBUG_MASK in this same file.

The code that understands the letters after -D is in perl.c\, around line 2363 :

        static char debopts\[\] = "psltocPmfrxuLHXDSTRJvC";

OK\, grrr\, krack

--- perl-current/perl.c 2002-09-04 16​:07​:19.000000000 +0200 +++ perl-current/perl.c 2002-09-16 16​:57​:59.000000000 +0200 @​@​ -2360\,7 +2360\,7 @​@​ Perl_moreswitches(pTHX_ char *s) forbid_setid("-D"); if (isALPHA(s[1])) { /* if adding extra options\, remember to update DEBUG_MASK */ - static char debopts[] = "psltocPmfrxuLHXDSTRJvC"; + static char debopts[] = "psltocPmfrxuHXDSTRJvC"; char *d;

     for \(s\+\+; \*s && \(d = strchr\(debopts\,\*s\)\); s\+\+\)

Are you going to add a warning on -L that says that leaktest is gone? Or just let the warning that they'll get​:

  Unrecognized switch​: -L (-h will show valid options).

be enough of a hint to RTFM. I suspect that no-one not on p5p attempts to use leaktest\, so it's probably not worth a warning.

Nicholas Clark -- Even better than the real thing​: http​://nms-cgi.sourceforge.net/

p5pRT commented 21 years ago

From @hvds

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​: :On Sun 15 Sep 2002 12​:14\, Nick Ing-Simmons \nick@&#8203;ing\-simmons\.net wrote​: :> I vote for removing it. One less #define forest to fight through. : :Wrrrmmmmm\, wrmmmmmm\, crrrrrrrrrrrrrrrrrrrrrr :LEAKTEST? What LEAKTEST?

Thanks. I think it makes sense to rip LEAKTEST out; your point that​:

:The chances that LEAKTEST will be changed to *work* on those systems is :problably about the same to the chance that valgrind is ported to such system

seems the most relevant (except that I think the chance is much less - porting a valgrind-like tool would have much more general usefulness).

Could you submit a combined patch that includes the -DL removal and the correct debopts string? I'm vacillating on Nicholas' suggestion of a warning on -DL\, so I'll leave that one up to you.

Cheers\,

Hugo

p5pRT commented 21 years ago

From @tux

On Mon 23 Sep 2002 18​:14\, \hv@&#8203;crypt\.org wrote​:

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​: :On Sun 15 Sep 2002 12​:14\, Nick Ing-Simmons \nick@&#8203;ing\-simmons\.net wrote​: :> I vote for removing it. One less #define forest to fight through. : :Wrrrmmmmm\, wrmmmmmm\, crrrrrrrrrrrrrrrrrrrrrr :LEAKTEST? What LEAKTEST?

Thanks. I think it makes sense to rip LEAKTEST out; your point that​:

:The chances that LEAKTEST will be changed to *work* on those systems is :problably about the same to the chance that valgrind is ported to such system

seems the most relevant (except that I think the chance is much less - porting a valgrind-like tool would have much more general usefulness).

Could you submit a combined patch that includes the -DL removal and

attached as combined

the correct debopts string? I'm vacillating on Nicholas' suggestion of a warning on -DL\, so I'll leave that one up to you.

No actions from this side now on this. Should we then also catch space?

a5​:/u/usr/merijn 105 > perl -DH -le 'print$^O'

EXECUTING...

hpux a5​:/u/usr/merijn 106 > perl -DL -le 'print$^O'

EXECUTING...

hpux a5​:/u/usr/merijn 107 > perl -D\ -le 'print$^O'

EXECUTING...

hpux a5​:/u/usr/merijn 108 > perl -Dq -le 'print$^O' Unrecognized switch​: -q (-h will show valid options). a5​:/u/usr/merijn 109 > perl -D\\367 -le 'print$^O' Unrecognized switch​: -? (-h will show valid options). a5​:/u/usr/merijn 110 >

Cheers\,

Hugo

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 21 years ago

From @tux

xx.txt

p5pRT commented 21 years ago

From @hvds

"H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl wrote​: :> Could you submit a combined patch that includes the -DL removal and : :attached as combined

Thanks\, applied as #17920. No more LEAKTEST.

Hugo

p5pRT commented 21 years ago

From @jhi

Since the whole LEAKTEST feature seems to have grown obsolete\, and is now removed\, I'm marking the problem ticket as resolved.

p5pRT commented 21 years ago

@jhi - Status changed from 'new' to 'resolved'

p5pRT commented 21 years ago

From Judith.Pemberton@ubsw.com

Hi\,

I am not in the office today. If your email is for sca or pd work or information\, please either raise a GRS request (GRSWeb -> Software Distribution Services -> SCA) or ask on the #SDS_SCA chat channel.

Thanks Judith

Visit our website at http​://www.ubswarburg.com

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate\, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted\, corrupted\, lost\, destroyed\, arrive late or incomplete\, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.

p5pRT commented 21 years ago

@jhi - Status changed from 'open' to 'resolved'