develooper Front page | perl.perl5.porters | Postings from March 2007

Re: perl_free problem

From:
Vadim
Date:
March 13, 2007 13:41
Subject:
Re: perl_free problem
Message ID:
45F59D5B.5070004@vkonovalov.ru
Irene Ladyko wrote:

>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:
>  
>

is this exact version of 5.9.4? (not a more recent development snapshot?)

How did you obtained this version?

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

what is PCH?

>Full code:
>
>#include "stdafx.h"
>  
>

does your problem works different without this "stdafx"?

>#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;
>}
>  
>

your linker uses c:/perl/lib/CORE, but build process involves
.../lib/CORE from within build tree.
Please compare if they are exactly same binaries.

Did you exactly used and installed beta Perl into c:/perl? What exact
perl version is there?

BR,
Vadim.






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About