develooper Front page | perl.perl5.porters | Postings from July 2009

[perl #67902] Access Vioolation MSVCRT when mixing scalar values and shared clones

Thread Next
From:
Erland Sommarskog
Date:
July 27, 2009 04:12
Subject:
[perl #67902] Access Vioolation MSVCRT when mixing scalar values and shared clones
Message ID:
rt-3.6.HEAD-5008-1248639263-1056.67902-75-0@perl.org
# New Ticket Created by  Erland Sommarskog 
# Please include the string:  [perl #67902]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=67902 >


This is a bug report for perl from esquel@sommarskog.se,
generated with the help of perlbug 1.36 running under perl 5.10.0.


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

The script below may or may not be correct. That is, maybe it is not
intended that you should do things like this. However, the outcome
when running it on ActivePerl 1005 is that I get an Access Violation
on the last statement in the script. Either I should get an error
message telling me "you can't do that", or the assignment should
succeed.

...............................
use strict;
use threads;
use threads::shared;

my $td : shared = shared_clone({});

warn "Write a string\n";
$td->{Input} = "somestring";

warn "Write an array reference\n";
$td->{Input} = shared_clone([]);

warn "Write a new string\n";
$td->{Input} = "shoestring";
.................................

This is a summary of the crash details I get from Dr Watson

Problem Event Name:   APPCRASH
  Application Name:   perl.exe
  Application Version:   5.10.0.1005
  Application Timestamp:   4a199ba1
  Fault Module Name:   msvcrt.dll
  Fault Module Version:   7.0.6002.18005
  Fault Module Timestamp:   49e04189
  Exception Code:   c0000005
  Exception Offset:   000000000000114a
  OS Version:   6.0.6002.2.2.0.256.1
  Locale ID:   1053
  Additional Information 1:   c9f2
  Additional Information 2:   37d41fa3f85b1e40f599f5dffe4ff997
  Additional Information 3:   def6
  Additional Information 4:   e54449e06bf3570e70d3b1010a27855a



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
---
Site configuration information for perl 5.10.0:

Configured by SYSTEM at Sun May 24 12:17:14 2009.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=5.00, 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 -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='14.0.50727', 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:"F:\Perl\AS1005-x86\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=true, libperl=perl510.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:"F:\Perl\AS1005-x86\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY
    f7bbab select() generates 'Invalid parameter' messages on Windows Vista.
    8dc00b fix buffer overflow in win32_select()
    36f064 do/require don't treat '.\foo' or '..\foo' as absolute paths on Windows
    287a96 fix -p function and Fcntl::S_IFIFO constant under Microsoft VC compiler
    406878 avoids segfaults invoking S_raise_signal() (on Linux)
    40c7cc Win32 process ids can have more than 16 bits
    37589e Load 'loadable object' with non-default file extension
    d374f9 64-bit fix for Time::Local

---
@INC for perl 5.10.0:
    F:\Utveckling\AbaPerls\Perl
    F:/Perl/AS1005-x86/site/lib
    F:/Perl/AS1005-x86/lib
    .

---
Environment for perl 5.10.0:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=F:\Perl\AS1005-x86\bin;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\bin;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\VCPackages;F:\Perl\AS1002-AMD64\site\bin;F:\Perl\AS1002-AMD64\bin;F:\Utveckling\AbaPerls\Perl;F:\Utveckling\Diverse\;F:\Perl\AS1002-x86\site\bin;F:\Perl\AS1002-x86\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft S!
 QL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\TextPad 4;C:\Program Files (x86)\Beyond Compare 3;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;C:\strawberry\c\bin;C:\strawberry\perl\bin
    PERLLIB=F:\Utveckling\AbaPerls\Perl
    PERL_BADLANG (unset)
    SHELL (unset)


Thread Next


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