| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, pause() was implemented as a macro calling
win32_sleep((32767L << 16) + 32767), which was causing the following
problems with argumentless sleep():
- it was sleeping for 4262198 seconds (~50 days) instead of forever
- it was triggering "sleep(2147450879) too large" warning
This commit implements pause() as a proper function which calls
win32_msgwait() with an INFINITE timeout.
[perl #133376]
|
|
|
|
|
|
|
| |
since Lookup() treats its argument as NUL or '=' terminated.
Previously environment variable names longer than the size of the
buffer would result in a buffer overflow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the rewritten CRT in this version of Visual C++ it is no longer
possible (or at least not at all easy) to make use of the ioinfo struct,
which commit b47a847f62 (re-)introduced in order to fix RT#120091/118059.
Therefore, we effectively revert commit b47a847f62 for VS2015 onwards on
the basis that being able to build with VS2015 onwards is more important
than the RT#120091/118059 bug fix. This does unfortunately mean that perls
built with <=VS2013 will not be compatible with perls built with >=VS2015,
but they may well not have been compatible anyway because of the CRT
rewrite, and certainly wouldn't be compatible if perl builds with VS2015
were not supported!
See RT#125714 for more discussion about this.
|
|
|
|
|
|
|
| |
This allows some more memory to be shared between 2 perl processes since
it is const. VC 2013 32b build, before Virtual Size of perl523.dll
sections, .rdata 0x3DE00 bytes .data 0x1B90, after .rdata 0x3E140
.data 0x18B0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-the first arg of win32_get_privlib is not used if the registry is not
queried, create a macro to allow the arg to drop out on WIN32_NO_REGISTRY
builds for efficiency and not to have unused C litteral strings in the
binary
-This patch changes the ABI of
PerlEnv_lib_path/PerlEnvLibPath/win32_get_privlib between USE_NO_REGISTRY
and no USE_NO_REGISTRY. Since win32_get_privlib is not exported from
perl523.dll, assume it and PerlEnv_lib_path are not public API, note
technically PerlEnv_lib_path will be callable only on PERL_IMPLICIT_SYS
builds, on no PERL_IMPLICIT_SYS builds it will fail at link time since
win32_get_privlib isnt exported. Therefore place it in
non-[affecting]-binary compatibility even though it does affect binary
compatibility.
-delay load advapi32.dll to save startup time (loading the DLL and the DLL
calling its initializers in DllMain) and one 4 KB memory page for
advapi32's .data section (doing "perl -E"sleep 100" on WinXP shows
advapi32 has a 20KB long .data section, first 4 KB are unique to the
process, the remaining 16KB are COW shared between processes according
to vmmap tool), putting a DebugBreak() in pp_getlogin and doing a
"nmake all" shows miniperl never calls getlogin during the build process.
An nmake test shows only ext/POSIX/t/wrappers.t and lib/warnings.t execute
pp_getlogin. Keeping advapi32.dll out of the perl process requires
removing comctl32.dll, since comctrl32.dll loads advapi32.dll, from perl
which I always do as a custom patch.
filed as [perl #123658]
XXXXXXXXXXXXXXXXXXXXXXX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The front end of PERL_IMPLICIT_SYS is PerlEnv_*/PerlSock_*/PerlProc_*/etc
macros. These are either macroed to C vtable calls when PERL_IMPLICIT_SYS
is on, or to the backend raw win32_*() functions when PERL_IMPLICIT_SYS
is off.
win32_get_*() were not following this convention. All this code looks like
a hack as if someone didn't have perms to edit perl.c, but they did have
perms to edit /win32, so they devise a scheme of hooking "unhooked"
win32_get_*() functions with win32.h macros for win32_get_*() to call the
Perl*() virutalization macros, and rename the original function bodies in
win32.c to g_win32_get_*() as to not make a macro loop.
Undo all of this hack by having perl.c call correct PerlEnv_* macro. This
refactoring will be useful for a future patch in #123658 to disable
win32 registry lookups.
|
| |
|
|
|
|
|
| |
Remove either unused dTHXes, or remove dTHXes where a nocontext func can
be used instead. Smaller/faster machine code is the result.
|
|
|
|
|
|
| |
Remove dTHXes in win32 perl funcs where they were not used, or could be
replaced with nocontext croaks/warns. Since Perl_get_context is a function
it is not optimized away by the compiler.
|
|
|
|
|
|
|
|
|
| |
dTHXes that were unused, or because Newx/Safefree were the only things
called were removed. In some places the dTHX turned into dTHXa and aTHXa
so the context is not fetched until it is actually used
(locality/frees a C stack slot or frees a non-volatile register). Also see
http://www.nntp.perl.org/group/perl.perl5.porters/2012/10/msg194414.html
and http://www.nntp.perl.org/group/perl.perl5.porters/2012/10/msg194861.html
|
|
|
|
|
|
|
|
|
| |
This commit removes a number of "* not implemented" strings from the image.
A win32_croak_not_implemented wrapper is created to reduce machine code
by not putting the format string on the C stack many times. embed.fnc was
used to declare win32_croak_not_implemented for proper cross compiler
support of noreturn (noreturn on GCC and VC ok). Tailcalling and noreturn
optimizations of the C compiler are heavily used in this commit.
|
|
|
|
| |
This gives noreturn to the 2 functions on Visual C Perl.
|
|
|
|
|
| |
This makes them match their declarations in perlhost.h, which fixes linker
errors when linking perl5XX.dll in a C++ build with VC.
|
|
|
|
|
|
|
|
| |
GetEnvironmentStringsA(..) return strings in the OEM code page. This
can actually mangle the environment strings if it contain special characters.
A better approach would be to get the utf-16 strings through GetEnvironmentStringsW(..)
and convert them to ANSI code page. This is now done by win32_getenvironmentstrings(..).
To free the block, you can use win32_freeenvironmentstrings(..).
|
|
|
|
|
|
|
|
|
|
| |
This stops PL_curstash from pointing to a freed-and-reused scalar in
cases like ‘package Foo; BEGIN {*Foo:: = *Bar::}’.
In such cases, another BEGIN block, or any subroutine definition,
would cause a crash. Now it just happily proceeds. newATTRSUB and
newXS have been modified not to call mro_method_changed_in in such
cases, as it doesn’t make sense.
|
|
|
|
|
| |
Remove support for the Borland C++ compiler on Win32, as agreed here:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00034.html
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
instead of caching it
The intent is that by not caching $$, we eliminate one opportunity for bugs:
If one embeds Perl or uses XS and calls fork(3) from C, Perls notion of $$
may go out of sync with what getpid() returns. By always fetching the
value of $$ via getpid(), this bug opportunity is eliminated. The overhead
of always fetching $$ should be small and is likely only used for tempfile
creation, which should be dwarfed by file system accesses.
|
|
|
|
|
|
|
| |
This is a refinement of commit 3aa0ac5aa. We still want to hang on
to the mapping between pseudo-process and thread handle, so that we
can still waitpid() after signalling SIGTERM. We just don't want to
wait implicitly on the signalled process anymore.
|
|
|
|
|
| |
Remove all supporting code for Windows 9x and Windows NT. The
minimum supported version is Windows 2000 now.
|
|
|
|
|
|
| |
Brings it in line with the rest of the PerlStdIO* functions that
accept parameters in the same order as the corresponding PerlSIO_*
macros. See also commit ecc880cc.
|
|
|
|
|
|
|
|
|
| |
They should have the same prototype as in stdio.
This "proper fix" replaces the 5.12.0 compatible fix in commit 634b482,
but cannot be integrated into 5.12.1 because it breaks binary compatibility.
See also http://rt.perl.org/rt3/Public/Bug/Display.html?id=72704
|
|
|
|
|
|
|
|
| |
Commit 827da6a38 added a custom isatty() implementation
in win32/perlhost.h, but that code will only be used when
perl is compiled with -DPERL_IMPLICIT_SYS. This change
makes sure that the custom implementation will be used
on Windows for all choices of build options.
|
|
|
|
|
|
|
|
|
| |
The Microsoft C version of isatty() returns TRUE for all
character mode devices, including the /dev/null style "nul"
device and printers like "lpt1".
The included test has only been tested on Windows and Linux;
the device names for OS/2 and VMS are just best guesses...
|
|
|
|
|
|
|
|
| |
Commit adab9969 tried to clean up those additional scopes, but failed
because some of the memory was allocated from a different pool. To
avoid triggering the assert() in perl_destruct() this change instead
moves the one remaining scope back to the root of the stack, effectively
discarding the additional frames without any further processing.
|
|
|
|
|
|
| |
perl_destruct() contains an assertion that the scope stack
is empty. The remaining scopes are due to fork() being
called from within a BEGIN block.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
Using the attached patch to the blead source (as of a few hours ago), I can
build perl with the following OS/compiler/make combos.
On 32-bit XP:
MSVC++ 7.0 / dmake (uses win32/makefile.mk)
MSVC++ 7.0 / nmake (uses win32/Makefile)
Borland C++ 5.5.1 / dmake
mingw.org's gcc-4.3.0 / dmake
mingw.org's gcc-3.4.5 / dmake
mingw-w64.sf's 32-bit gcc-4.4.3 / dmake
(There's a bug with that last compiler on XP.
The perl it builds on XP hangs on XP, but runs ok if copied across to Vista.
I think this is unrelated to the patches - probably even unrelated to perl.
Without these patches perl will not even build using that last compiler.)
On 64-bit Vista:
32-bit MSVC++ 7.0 / nmake (uses win32/Makefile)
32-bit MSVC++ 7.0 / dmake (uses win32/makfile.mk)
32-bit Borland C++ 5.5.1 / dmake
mingw.org's 32-bit gcc-4.4.0 / dmake
mingw.org's 32-bit gcc-3.4.5 / dmake
mingw-w64.sf's 32-bit gcc-4.4.3 / dmake
mingw-w64.sf's 64-bit gcc-4.4.3 / dmake
mingw-w64.sf's 64-bit x86_64-w64-mingw32-gcc-4.4.3 / dmake
64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / dmake (uses
win32/makefile.mk)
64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / nmake (uses
win32/Makefile)
Not all of those builds pass all tests - but where the removal of the
patches still permits perl to build, the same tests still fail. That is,
*nothing* is lost by including these patches - but there are significant
gains.
Each of the above builds was done according to the normal win32
configuration parameters - ie multi-threaded, non debug. No unusual config
settings were applied. (I did build one debug perl on Vista using
mingw-w64.sf's 32-bit gcc-4.4.3 and it built fine.)
Please feel free to apply these patches (with or without modification) -
and, yes, you're more than welcome to blame me if they cause any breakages
;-)
Of course, some of those compilers (Borland, Microsoft, and the compilers
from mingw.org) already build perl *without* having to apply any patches.
It's just the other compilers that need the patches. The purpose of testing
with Borland, Microsoft, and the mingw.org compilers is just to check that
these patches don't break them.
As a final check, I've done a build on my aging linux (mandrake-9.1) box,
gcc-3.2.2. I built with '-des -Duselongdouble -Duse64bitint -Dusedevel'. No
problem with that, either.
If there's additional testing requirements please let me know, and I'll try
to oblige.
I believe the patch applied successfully for me - see below my sig for the
output.
Cheers,
Rob
Rob@desktop2 ~/GIT/blead
$ patch -p0 <blead_diff.diff
patching file dist/threads/threads.xs
patching file handy.h
patching file cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
patching file op.c
Hunk #1 succeeded at 5774 (offset 47 lines).
patching file pp_pack.c
patching file util.c
Hunk #1 succeeded at 5366 (offset -28 lines).
patching file win32/makefile.mk
patching file win32/perlhost.h
patching file win32/win32.c
patching file win32/win32.h
patching file README.win32
patching file XSUB.h
|
|
|
|
|
|
| |
This reverts commit 240bfeb992996de28603a7f9e3ee34ecc6e3f286.
(its now fixed in a better way in 136e7e597c0d85149921561591710bc54123b221)
|
|
|
|
|
|
|
|
|
| |
This keeps the ptr-table table around after the thread has been created.
This has been on for user threads for a while now, but not for
Windows forks. Turns out that Variable::Magic relies on the table still
being there, so crashes under windows forks. This increases memory usage
per fork, but stops things crashing. Sigh.
[perl #66158]
|
|
|
|
| |
CLONEf_COPY_STACKS rather than 1
|
|
|
|
|
| |
as we already know it, and use it in S_init_perllib() to save a strlen() in
S_incpush_use_sep().
|
|
|
|
|
| |
http://www.nntp.perl.org/group/perl.daily-build.reports/2008/02/msg53937.html
p4raw-id: //depot/perl@33370
|
|
|
| |
p4raw-id: //depot/perl@33269
|
|
|
|
|
|
| |
system specific directories. I think I've chainsawed all of them now,
but I can't guarantee that it compiles anywhere from win32.
p4raw-id: //depot/perl@32713
|
|
|
|
|
| |
version of ioctl()
p4raw-id: //depot/perl@31428
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
represented in the current codepage
Date: Thu, 28 Dec 2006 18:59:40 -0800
Message-ID: <vq09p2p09k6rcu6c9t0mab3vnc335ghg9m@4ax.com>
Subject: Re: [PATCH] Use short pathnames in $^X and @INC if the long form cannot be represented in the current codepage
From: Jan Dubois <jand@ActiveState.com>
Date: Wed, 03 Jan 2007 08:12:35 -0800
Message-ID: <orknp2pj17265modfosjkp2qtt4bdgtgjp@4ax.com>
p4raw-id: //depot/perl@29675
|
|
|
|
|
| |
Message-ID: <m8hjo2pasv3hdbhd1sj9sasen7tm38hrhp@4ax.com>
p4raw-id: //depot/perl@29605
|
|
|
|
|
|
|
| |
codepage
Message-ID: <3rteo219or8hqr511e4vg1fnsgvgemb4sh@4ax.com>
p4raw-id: //depot/perl@29598
|
|
|
|
|
| |
Message-ID: <9b18b3110604271430k4de84685jec6535ded195ed94@mail.gmail.com>
p4raw-id: //depot/perl@28003
|
|
|
|
|
|
| |
(They both complain "invalid conversion from `void*' to `HWND__*'"
otherwise)
p4raw-id: //depot/perl@26637
|
|
|
|
|
|
|
| |
Message-ID: <015901c60207$abd64210$d563a8c0@candy>
(Without the proposed alarm.t test)
p4raw-id: //depot/perl@26379
|
|
|
|
|
|
| |
From: "Jan Dubois" <jand@ActiveState.com>
Message-ID: <078001c5e41e$585c4140$6401a8c0@candy>
p4raw-id: //depot/perl@26041
|
|
|
|
|
|
|
|
|
| |
Fixes a warning brought about by change #25941 (which made the
filename argument const).
The various implementations of PerlLIOUtime() (in NetWare/, win32/
and wince/) already take a const filename.
p4raw-link: @25941 on //depot/perl: e96b369dc61077fe31b75895167f55dbce4d7519
p4raw-id: //depot/perl@25945
|
|
|
|
|
|
| |
be used on Win32, but it does fix the problem at hand.
p4raw-link: @25850 on //depot/perl: ca0c25f67f45e5dccb746852d8545d7ae29ed067
p4raw-id: //depot/perl@25859
|
|
|
|
|
| |
Message-ID: <lrd5ml7i8s.fsf@caliper.activestate.com>
p4raw-id: //depot/perl@25688
|
|
|
|
|
|
|
|
| |
Message-ID: <42CC3CE9.5050606@divsol.com>
(reverted all dual-lived modules since they must work with older
perls too so must wait for a new Devel::PPPort)
p4raw-id: //depot/perl@25101
|
|
|
|
|
|
|
|
| |
That fact that it wasn't const already was highlighted by a warning
from pp_open_dir() generated by change 24743. Rather than undo the
const change in pp_open_dir(), this seems to make more sense. Hope I
haven't broken Netware or WinCE.
p4raw-id: //depot/perl@24974
|
|
|
|
|
|
| |
leak even in the simplest fork() loop, because perl_construct()
now does the equivalent of %ENV assignments using mg_set())
p4raw-id: //depot/perl@19717
|
|
|
| |
p4raw-id: //depot/perl@18763
|