Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blib.pm dont shell out to "cmd.exe" on Win32+Win32.pm #22683

Open
wants to merge 2 commits into
base: blead
Choose a base branch
from

Commits on Oct 23, 2024

  1. blib.pm dont shell out to "cmd.exe" on Win32+Win32.pm

    -document Internals::getcwd() enough, with scary warnings, for future
     core devs, or CPAN devs.  A permanent reason for Internals::getcwd() to
     exist on Win32 full perl was found. See code comments.
    -optimize a bit the built-in perl core cwd() XSUBs, use TARG, and group
     stack manipulation together for C compiler variable liveness reasons aka
     less variables to save in non-vol regs or on C stack around function
     calls.
    bulk88 committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    769fbf2 View commit details
    Browse the repository at this point in the history
  2. builtin::getcwd WIP Perl#3

    Add builtin::getcwd
    
    Perl#3 gcc syntax fixes
    
    -win32_get_childdir() skip the strlen() because GetCurrentDirectoryA()
     gives it to us, handle 32KB paths if encountered.
     It is an infinite retry loop since its been reported, in multithreading,
     GCD()/CWD can change and get longer on our OS thread's between
     overflow Perl#1 and correct-size attempt Perl#2 because CWD val is a race cond.
     So all overflow conditions must trigger realloc. If the whole C stack
     is used up with alloca() and infinite retry. A SEGV is good.
     Win API/UNICODE_STRING struct is hard coded to USHORT/SHORT. If
     GetCurrentDirectoryA() returns above 65KB a SEGV is good. If
     GetCurrentDirectoryA()'s impl is doing {return buflen+1;} which is an API
     violation, OS is damaged, a SEGV is good. The race retry will never
     realistically trigger more than 1x ever, 2x rounds through retry loop
     might happen after a few centuries semi-guess.
    
    -CPerlHost::GetChildDir(void) is TODO now that
     m_pvDir->GetCurrentDirectoryA/W have correct retvals.
    
    -perllib.c silence warnings, return debug code accidentally removed in
    
    Merge WinCE and Win32 directories -- Initial patch
    7bd379e 4/27/2006 7:30:00 PM
    bulk88 committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    59087c3 View commit details
    Browse the repository at this point in the history