Front page | perl.perl5.porters |
Postings from March 2007
Re[2]: perl_free problem
From:
Irene Ladyko
Date:
March 13, 2007 03:47
Subject:
Re[2]: perl_free problem
Message ID:
1639381928.20070313164545@odesk.com
Hello, all.
I'd added more information about my problem. Here it is:
------
platform - win32 (WinXP).
------
Memory protection - Paging
-----
I use VC.NET 2003.
------
Output of 'perl -V'
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.3077', 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:\perl\lib\CORE" -machine:x86'
libpth=\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:\perl\lib\CORE" -machine:x86'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
USE_LARGE_FILES USE_PERLIO
Built under MSWin32
Compiled at Mar 12 2007 14:54:36
@INC:
D:/Irina/3rdparty/perl/lib
.
------
Unhandled exception at 0x7c901230 in perlInterpreter.exe:
User breakpoint.
------
Run with empty command line, and empty PCH.
Full code:
#include "stdafx.h"
#include <EXTERN.h>
#include <perl.h>
static PerlInterpreter *my_perl;
#define SAY_HELLO "-e", "print qq(Hi, I'm $^X\n)"
int main(int argc, char **argv)
{
PerlInterpreter *one_perl, *two_perl;
char *one_args[] = { "one_perl", SAY_HELLO };
char *two_args[] = { "two_perl", SAY_HELLO };
PERL_SYS_INIT3(&argc,&argv,&env);
one_perl = perl_alloc();
my_perl = one_perl;
PERL_SET_CONTEXT(one_perl);
perl_construct(one_perl);
PERL_SET_CONTEXT(one_perl);
perl_parse(one_perl, NULL, 3, one_args, (char **)NULL);
PERL_SET_CONTEXT(one_perl);
perl_destruct(one_perl);
PERL_SET_CONTEXT(one_perl);
perl_free(one_perl);
two_perl = perl_alloc();
my_perl = two_perl;
PERL_SET_CONTEXT(two_perl);
perl_construct(two_perl);
PERL_SET_CONTEXT(two_perl);
perl_parse(two_perl, NULL, 3, two_args, (char **)NULL);
PERL_SET_CONTEXT(two_perl);
perl_destruct(two_perl);
PERL_SET_CONTEXT(two_perl);
perl_free(two_perl);
PERL_SYS_TERM();
return 0;
}
------
Stack:
ntdll.dll!7c901230()
ntdll.dll!7c96c943()
ntdll.dll!7c95db9c()
ntdll.dll!7c96cd11()
ntdll.dll!7c96df66()
ntdll.dll!7c926abe()
ntdll.dll!7c94a5d0()
ntdll.dll!7c94a5d0()
ntdll.dll!7c9268ad()
ntdll.dll!7c9268ad()
msvcrt.dll!77c1c2de()
ntdll.dll!7c926abe()
ntdll.dll!7c9268ad()
ntdll.dll!7c9268ad()
ntdll.dll!7c9268ad()
> perl59.dll!VMem::FreeLock() Line 237 C++
perl59.dll!VMem::Free(void * pMem=0x00860000) Line 222 + 0x8 C++
perl59.dll!PerlMemFree(IPerlMem * piPerl=0x00860000, void * ptr=0x00860000) Line 306 C++
perl59.dll!Perl_safesysfree(void * where=0x0012fbb8) Line 250 + 0xe C
perl59.dll!Perl_sv_clear(interpreter * my_perl=0x00860000, sv * sv=0x00000000) Line 5122 C
msvcrt.dll!77c1c2de()
msvcrt.dll!77c1c2de()
msvcrt.dll!77c1c2de()
perl59.dll!VMem::Free(void * pMem=0x008a4cac) Line 222 C++
perl59.dll!CPerlHost::FreeShared(void * ptr=0x008a4cac) Line 101 C++
perl59.dll!PerlMemSharedFree(IPerlMem * piPerl=0x00882c18, void * ptr=0x008a4cac) Line 360 C++
perl59.dll!perl_destruct(interpreter * my_perl=0x00862bfc) Line 1058 + 0x12 C
perlInterpreter.exe!main(int argc=1, char * * argv=0x00893d80) Line 390 + 0x9 C++
perlInterpreter.exe!mainCRTStartup() Line 259 + 0x19 C
kernel32.dll!7c816d4f()
kernel32.dll!7c8399f3()
I hope on your help.
--
Best Regards,
Irene ,
C++ Developer
of ISS Art, Ltd., Omsk, Russia.
http://issart.com
http://issart.com/index/Portfolio/cpp&lang=eng
mailto:your@address.com
-
Re[2]: perl_free problem
by Irene Ladyko