Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not OK: perl v5.7.0 +SUIDMAIL +DEVEL6707 on i686-linux 2.2.5-16 (UNINSTALLED) #2404

Closed
p5pRT opened this issue Aug 19, 2000 · 7 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Aug 19, 2000

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

Searchable as RT3759$

@p5pRT
Copy link
Author

p5pRT commented Aug 19, 2000

From @vanstyn

@​6713 failed one test​:
lib/gdbm............Bad realloc() ignored at lib/gdbm.t line 85.
lib/gdbm............dubious
  Test returned status 0 (wstat 139, 0x8b)
  test program seems to have generated a core

(gdb) where
#0 0x80a63be in Perl_safexrealloc (wh=0x8176c28, size=2) at util.c​:257
#1 0x80ca2d5 in Perl_sv_usepvn (sv=0x81f0d3c,
  ptr=0x8176c28 "hUUUUUUU@​l\027\b", len=1) at sv.c​:3094
#2 0x401ac3d9 in output_datum (arg=0x81f0d3c,
  str=0x8176c28 "hUUUUUUU@​l\027\b", size=1) at GDBM_File.xs​:60
#3 0x401ae0f8 in XS_GDBM_File_FIRSTKEY (cv=0x81f3d78) at GDBM_File.c​:433
#4 0x80c1ee5 in Perl_pp_entersub () at pp_hot.c​:2599
#5 0x80b92ea in Perl_runops_debug () at run.c​:56
#6 0x805e3bf in S_call_body (myop=0xbffff77c, is_eval=0) at perl.c​:1804
#7 0x805dcb0 in perl_call_sv (sv=0x81f0d18, flags=64) at perl.c​:1681
#8 0x805da7e in perl_call_method (methname=0x81369cf "FIRSTKEY", flags=0)
  at perl.c​:1614
#9 0x80af9a5 in Perl_magic_nextpack (sv=0x81f0fa0, mg=0x8273ed0,
  key=0x823a56c) at mg.c​:1258
#10 0x80b5814 in Perl_hv_iternext (hv=0x81f0fa0) at hv.c​:1263
#11 0x8111c0b in Perl_do_kv () at doop.c​:1145
#12 0x80e0510 in Perl_pp_keys () at pp.c​:2658
#13 0x80b92ea in Perl_runops_debug () at run.c​:56
#14 0x805d741 in S_run_body (oldscope=1) at perl.c​:1447
#15 0x805d34b in perl_run (my_perl=0x8176c08) at perl.c​:1367
#16 0x805a24b in main (argc=2, argv=0xbffff994, env=0xbffff9a0)
  at perlmain.c​:52
#17 0x400a4cb3 in __libc_start_main (main=0x805a1d0 <main>, argc=2,
  argv=0xbffff994, init=0x8059354 <_init>, fini=0x812981c <_fini>,
  rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffff98c)
  at ../sysdeps/generic/libc-start.c​:78
(gdb)

Using libgdbm.so.2.0.0.

Perl Info

Flags:
    category=install
    severity=none

Site configuration information for perl v5.7.0:

Configured by hv at Sat Aug 19 16:21:10 BST 2000.

Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.5-16, archname=i686-linux
    uname='linux crypt.compulink.co.uk 2.2.5-16 #1 sun may 30 23:00:18 bst 1999 i686 unknown '
    config_args='-des -Doptimize=-g -DLEAKTEST -Dprefix=/opt/bleadperl-m -Dusedevel -Dusemymalloc'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-g -DLEAKTEST', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release), gccosandvers=
    cppflags='-DDEBUGGING -fno-strict-aliasing'
    ccflags ='-DDEBUGGING -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
    libc=/lib/libc-2.1.1.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    SUIDMAIL - fixes for suidperl security
    DEVEL6707


@INC for perl v5.7.0:
    lib
    /opt/bleadperl-m/lib/5.7.0/i686-linux
    /opt/bleadperl-m/lib/5.7.0
    /opt/bleadperl-m/lib/site_perl/5.7.0/i686-linux
    /opt/bleadperl-m/lib/site_perl/5.7.0
    /opt/bleadperl-m/lib/site_perl
    .


Environment for perl v5.7.0:
    HOME=/home/hv
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/hv/bin:/usr/bin:/usr/local/bin:/bin:/usr/X11R6/bin
    PERL_BADLANG (unset)
    SHELL=/bin/sh


@p5pRT
Copy link
Author

p5pRT commented Aug 19, 2000

From @jhi

On Sat, Aug 19, 2000 at 05​:26​:40PM +0100, Hugo wrote​:

This is a build failure report for perl from hv@​crypt.compulink.co.uk,
generated with the help of perlbug 1.31 running under perl v5.7.0.

-----------------------------------------------------------------
[Please enter your report here]

@​6713 failed one test​:
lib/gdbm............Bad realloc() ignored at lib/gdbm.t line 85.
lib/gdbm............dubious
Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core

Where did that come from? Please retry with 6716 (though I don't
think it's much better than 6713...) but ext/GDBM_File code hasn't
changed for months, so the bug must coming from somewhere else.

@p5pRT
Copy link
Author

p5pRT commented Aug 19, 2000

From @vanstyn

In <20000819121852.B617@​chaos.wustl.edu>, Jarkko Hietaniemi writes​:
:On Sat, Aug 19, 2000 at 05​:26​:40PM +0100, Hugo wrote​:
:> This is a build failure report for perl from hv@​crypt.compulink.co.uk,
:> generated with the help of perlbug 1.31 running under perl v5.7.0.
:>
:> -----------------------------------------------------------------
:> [Please enter your report here]
:>
:> @​6713 failed one test​:
:> lib/gdbm............Bad realloc() ignored at lib/gdbm.t line 85.
:> lib/gdbm............dubious
:
:> Test returned status 0 (wstat 139, 0x8b)
:> test program seems to have generated a core
:
:Where did that come from? Please retry with 6716 (though I don't
:think it's much better than 6713...) but ext/GDBM_File code hasn't
:changed for months, so the bug must coming from somewhere else.

Possibly because I've been turning on LEAKTEST in trying to debug the
Larry Virden's htpl coredump. I'll try to have another go without.

Hugo

@p5pRT
Copy link
Author

p5pRT commented Aug 19, 2000

From @vanstyn

In <200008191902.UAA09594@​crypt.compulink.co.uk>, Hugo writes​:
:In <20000819121852.B617@​chaos.wustl.edu>, Jarkko Hietaniemi writes​:
:​:On Sat, Aug 19, 2000 at 05​:26​:40PM +0100, Hugo wrote​:
:​:> This is a build failure report for perl from hv@​crypt.compulink.co.uk,
:​:> generated with the help of perlbug 1.31 running under perl v5.7.0.
:​:>
:​:> -----------------------------------------------------------------
:​:> [Please enter your report here]
:​:>
:​:> @​6713 failed one test​:
:​:> lib/gdbm............Bad realloc() ignored at lib/gdbm.t line 85.
:​:> lib/gdbm............dubious
:
:​:
:​:> Test returned status 0 (wstat 139, 0x8b)
:​:> test program seems to have generated a core
:​:
:​:Where did that come from? Please retry with 6716 (though I don't
:​:think it's much better than 6713...) but ext/GDBM_File code hasn't
:​:changed for months, so the bug must coming from somewhere else.
:
:Possibly because I've been turning on LEAKTEST in trying to debug the
:Larry Virden's htpl coredump. I'll try to have another go without.

Confirmed that all tests pass with @​6718 if I avoid LEAKTEST.

Hugo

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 2000

From [Unknown Contact. See original ticket]

On Sat, 19 Aug 2000, Jarkko Hietaniemi wrote​:

On Sat, Aug 19, 2000 at 05​:26​:40PM +0100, Hugo wrote​:

This is a build failure report for perl from hv@​crypt.compulink.co.uk,
generated with the help of perlbug 1.31 running under perl v5.7.0.

-----------------------------------------------------------------
[Please enter your report here]

@​6713 failed one test​:
lib/gdbm............Bad realloc() ignored at lib/gdbm.t line 85.
lib/gdbm............dubious
Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core

Where did that come from? Please retry with 6716 (though I don't
think it's much better than 6713...) but ext/GDBM_File code hasn't
changed for months, so the bug must coming from somewhere else.

The attached patch makes lib/gdbm.t tests pass on 6717.

This comment from handy.h is enlightning​:

/*
  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
*/

Thanks,
Radu Greab

Inline Patch
--- ext/GDBM_File/GDBM_File.xs~	Sun Aug 13 21:33:34 2000
+++ ext/GDBM_File/GDBM_File.xs	Sun Aug 20 17:04:28 2000
@@ -56,7 +56,7 @@
 static void
 output_datum(pTHX_ SV *arg, char *str, int size)
 {
-#if !defined(MYMALLOC) || (defined(MYMALLOC) && defined(PERL_POLLUTE_MALLOC))
+#if !defined(MYMALLOC) || (defined(MYMALLOC) && defined(PERL_POLLUTE_MALLOC) && !defined(LEAKTEST))
 	sv_usepvn(arg, str, size);
 #else
 	sv_setpvn(arg, str, size);

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 2000

From @jhi

On Sun, Aug 20, 2000 at 06​:03​:26PM +0300, Radu Greab wrote​:

On Sat, 19 Aug 2000, Jarkko Hietaniemi wrote​:

On Sat, Aug 19, 2000 at 05​:26​:40PM +0100, Hugo wrote​:

This is a build failure report for perl from hv@​crypt.compulink.co.uk,
generated with the help of perlbug 1.31 running under perl v5.7.0.

-----------------------------------------------------------------
[Please enter your report here]

@​6713 failed one test​:
lib/gdbm............Bad realloc() ignored at lib/gdbm.t line 85.
lib/gdbm............dubious
Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core

Where did that come from? Please retry with 6716 (though I don't
think it's much better than 6713...) but ext/GDBM_File code hasn't
changed for months, so the bug must coming from somewhere else.

The attached patch makes lib/gdbm.t tests pass on 6717.

Thanks, applied. (Included in the 6727 snapshot.)

This comment from handy.h is enlightning​:

/*
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.

Anyone with too much free time feel like cleaning up the extensions
in this regard?

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 2000

From @timj

On Sun, 20 Aug 2000, Jarkko Hietaniemi 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.

Anyone with too much free time feel like cleaning up the extensions
in this regard?

For the record safemalloc is used in

  *DBM_File, DB_File and DynaLoader (aix, mpeix, next and vms)
  x2p

About 25 lines in total (10 from x2p).

saferealloc is used in

  DynaLoader for VMS
  x2p

6 lines. No patch since for most of these cases I can't test the code on
my system (and I imagine that x2p is non-critical).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant