perl512.dll!Perl_safesysrealloc(void * where=0x018612ac, unsigned int size=44) Line 199 + 0x9 C
perl512.dll!Perl_sv_grow(interpreter * my_perl=0x00353d7c, sv * const sv=0x003578ec, unsigned int newlen=28) Line 1555 + 0xd C
perl512.dll!Perl_sv_catpvn_flags(interpreter * my_perl=0x00353d7c, sv * const dsv=0x003578ec, const char * sstr=0x2821454c, const unsigned int slen=25, const long flags=2) Line 4780 + 0x2c C
perl512.dll!Perl_sv_vcatpvfn(interpreter * my_perl=0x00353d7c, sv * const sv=0x003578ec, const char * const pat=0x2821454c, const unsigned int patlen=32, char * * const args=0x003bfeec, sv * * const svargs=0x00000000, const long svmax=0, char * const maybe_tainted=0x00000000) Line 9504 + 0x1a C
perl512.dll!Perl_sv_vsetpvfn(interpreter * my_perl=0x00353d7c, sv * const sv=0x003578ec, const char * const pat=0x2821454c, const unsigned int patlen=32, char * * const args=0x003bfeec, sv * * const svargs=0x00000000, const long svmax=0, char * const maybe_tainted=0x00000000) Line 9259 + 0x25 C
perl512.dll!Perl_vmess(interpreter * my_perl=0x00353d7c, const char * pat=0x2821454c, char * * args=0x003bfeec) Line 1197 + 0x28 C
perl512.dll!Perl_vwarn(interpreter * my_perl=0x00353d7c, const char * pat=0x2821454c, char * * args=0x003bfeec) Line 1455 + 0x11 C
perl512.dll!Perl_warn(interpreter * my_perl=0x00353d7c, const char * pat=0x2821454c, ...) Line 1495 + 0x11 C
perl512.dll!sig_terminate(interpreter * my_perl=0x00353d7c, int sig=2) Line 2112 + 0x1d C
perl512.dll!win32_ctrlhandler(unsigned long dwCtrlType=0) Line 4689 + 0xb C
kernel32.dll!_CtrlRoutine@4() + 0x19c
kernel32.dll!_BaseThreadStart@8() + 0x37
####
ntdll.dll!_DbgPrint()
ntdll.dll!_RtlDebugFreeHeap@12() + 0x97
ntdll.dll!_RtlFreeHeapSlowly@12() + 0x246cf
ntdll.dll!_RtlFreeHeap@12() + 0x17646
msvcrt.dll!_free() + 0xc3
> perl512.dll!VMem::Free(void * pMem=0x01832384) Line 229 + 0xa C++
perl512.dll!CPerlHost::Free(void * ptr=0x01832384) Line 68 + 0x22 C++
perl512.dll!PerlMemFree(IPerlMem * piPerl=0x0024577c, void * ptr=0x01832384) Line 311 C++
perl512.dll!Perl_safesysfree(void * where=0x01832384) Line 262 + 0x1a C
perl512.dll!Perl_sv_clear(interpreter * my_perl=0x00353f4c, sv * const sv=0x00357afc) Line 5865 + 0xc C
perl512.dll!Perl_sv_free2(interpreter * my_perl=0x00353f4c, sv * const sv=0x00357afc) Line 5985 + 0xd C
perl512.dll!Perl_sv_free(interpreter * my_perl=0x00353f4c, sv * const sv=0x00357afc) Line 5962 + 0xd C
perl512.dll!Perl_free_tmps(interpreter * my_perl=0x00353f4c) Line 167 + 0xd C
perl512.dll!Perl_pp_unstack(interpreter * my_perl=0x00353f4c) Line 218 + 0x17 C
perl512.dll!Perl_runops_debug(interpreter * my_perl=0x00353f4c) Line 2049 + 0xd C
perl512.dll!S_run_body(interpreter * my_perl=0x00353f4c, long oldscope=1) Line 2308 + 0xd C
perl512.dll!perl_run(interpreter * my_perl=0x00353f4c) Line 2233 + 0xd C
perl512.dll!RunPerl(int argc=2, char * * argv=0x00243ec8, char * * env=0x00244f20) Line 270 + 0x9 C++
perl.exe!main(int argc=2, char * * argv=0x00243ec8, char * * env=0x00242c58) Line 23 + 0x12 C
perl.exe!mainCRTStartup() Line 398 + 0xe C
kernel32.dll!_BaseProcessStart@4() + 0x23
####
C:\Documents and Settings\Owner\Desktop\w32i>perl -v
This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x86-multi-
hread
Copyright 1987-2010, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
C:\Documents and Settings\Owner\Desktop\w32i>perl -V
Summary of my perl5 (revision 5 version 12 subversion 2) 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 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSO
E -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -D
SE_PERLIO',
optimize='-Od -MD -Zi -DDEBUGGING',
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=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeks
ze=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -libpath:"c:\perl512\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 comdlg3
.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 comctl32.lib msvc
t.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib com
lg32.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 comctl32.lib
svcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -libpath:"c:\
erl512\lib\CORE" -machine:x86'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL PL_OP_SLAB_ALLOC
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Mar 23 2011 08:10:43
%ENV:
@INC:
C:/perl512/site/lib
C:/perl512/lib
.
####
#!/usr/bin/perl -w
use strict;
use warnings;
use v5.12;
use constant TOP => 1000000;
say "1 is prime.";
say "2 is prime.";
$SIG{INT} = sub {
print "ctrl c hit\n";
exit();
};
my $found = 2; # We already found 1 and 2.
OUTER: for( my $i = 3; $i < TOP; $i += 2 ) {
for( my $j = $i - 2; $j > 1; $j -= 2 ) {
( not $i % $j ) && next OUTER;
}
say "$i is prime.";
$found++;
}
say "Found $found primes between 1 and ", TOP, ".\n";
####
C:\Documents and Settings\Owner\Desktop>perl -MO=Deparse n8.pl
BEGIN { $^W = 1; }
sub BEGIN {
use warnings;
use strict 'refs';
require v5.12;
}
use constant ('TOP', 1000000);
use warnings;
use strict 'refs';
BEGIN {
$^H{'feature_unicode'} = q(1);
$^H{'feature_say'} = q(1);
$^H{'feature_state'} = q(1);
$^H{'feature_switch'} = q(1);
}
say '1 is prime.';
say '2 is prime.';
my $found = 2;
OUTER: for (my $i = 3; $i < 1000000; $i += 2) {
for (my $j = $i - 2; $j > 1; $j -= 2) {
next OUTER unless $i % $j;
}
say "$i is prime.";
++$found;
}
say "Found $found primes between 1 and ", 1000000, ".\n";
n8.pl syntax OK
C:\Documents and Settings\Owner\Desktop>
####
$SIG{INT} = sub {
print "ctrl c hit\n";
exit();
};
####
#!/usr/bin/perl -w
use strict;
use warnings;
use Time::HiRes 'usleep';
use v5.12;
use constant TOP => 1000000;
say "1 is prime.";
say "2 is prime.";
#$SIG{INT} =
#sub {
# print "ctrl c hit\n";
# exit();
#}
;
my $i;
my $j;
my $found = 2; # We already found 1 and 2.
OUTER: for( $i = 3; $i < TOP; $i += 2 ) {
for( $j = $i - 2; $j > 1; $j -= 2 ) {
if(( not $i % $j )) {
usleep(100);
next OUTER;
}
}
say "$i is prime.";
$found++;
}
say "Found $found primes between 1 and ", TOP, ".\n";
####
3557 is prime.
3559 is prime.
Terminating on signal SIGINT(2)
C:\Documents and Settings\Owner\Desktop>