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

[PATCH] crash in win32/VMem.h when out of memory #8878

Closed
p5pRT opened this issue Apr 20, 2007 · 6 comments
Closed

[PATCH] crash in win32/VMem.h when out of memory #8878

p5pRT opened this issue Apr 20, 2007 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 20, 2007

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

Searchable as RT42648$

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2007

From devin.heitmueller@gmail.com

Created by dheitmueller@devinxp.gridapp.com

This is a bug report for perl from dheitmueller@​devinxp.gridapp.com,
generated with the help of perlbug 1.35 running under perl 5.9.4.

-----------------------------------------------------------------
There is an condition in the VMem​::Realloc and VMem​::Malloc when
_USE_LINKED_LIST is enabled and the system is out of memory.

In cases where m_pmalloc/m_prealloc return a NULL pointer, the next line
of code calls LinkBlock(ptr) and will dereference the NULL pointer.

The attached patch handles the allocation failure and returns a NULL pointer
as expected to the caller.

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl 5.9.4:

Configured by dheitmueller at Mon Jan 22 17:18:02 2007.

Summary of my perl5 (revision 5 version 9 subversion 4) configuration:
  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=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='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='13.10.6030', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"c:\perl594\lib\CORE"  -machine:x86'
    libpth="C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\lib"
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib
odbc32.lib odbccp32.lib msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl59.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf  -libpath:"c:\perl594\lib\CORE"  -machine:x86'

Locally applied patches:



@INC for perl 5.9.4:
    C:/perl594/lib
    C:/perl594/site/lib
    .


Environment for perl 5.9.4:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual
Studio .NET 2003\Common7\Tools\bin;C:\Program Files\Microsoft Visual
Studio .NET 2003\SDK\v1.1\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;C:\Program
Files\ActiveState Komodo IDE 4.0\;C:\Program Files\ActiveState Komodo
3.5\;C:\activeperl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Intel\DMIX;C:\Program Files\Subversion\bin;C:\Program
Files\Common Files\Compuware;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files\Microsoft SQL
Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft
Visual Studio 8\Common7\IDE\PrivateAssemblies\;c:\perl\bin;C:\Program
Files\QuickTime\QTSystem\;
    PERL_BADLANG (unset)
    SHELL (unset)


-- 
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2007

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2007

From @steve-m-hay

Devin Heitmueller (via RT) wrote​:

# New Ticket Created by "Devin Heitmueller"
# Please include the string​: [perl #42648]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=42648 >

This is a bug report for perl from dheitmueller@​devinxp.gridapp.com,
generated with the help of perlbug 1.35 running under perl 5.9.4.

-----------------------------------------------------------------
There is an condition in the VMem​::Realloc and VMem​::Malloc when
_USE_LINKED_LIST is enabled and the system is out of memory.

In cases where m_pmalloc/m_prealloc return a NULL pointer, the next line
of code calls LinkBlock(ptr) and will dereference the NULL pointer.

The attached patch handles the allocation failure and returns a NULL pointer
as expected to the caller.

Thanks, applied as #31054.

--

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2007

From @steve-m-hay

Closing ticket since patch is now applied.

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2007

@steve-m-hay - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant