diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-30 08:36:38 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-30 08:36:38 +0000 |
commit | 3cb9023dc910d8a9abbd8d44e501f6e492155eb5 (patch) | |
tree | b6e1589a07fc36b3023e7493649f21049543cb91 /mg.c | |
parent | f9cbb277dec3cb2700132dedd25b05ea72cda45a (diff) | |
download | perl-3cb9023dc910d8a9abbd8d44e501f6e492155eb5.tar.gz |
The 'contiguous' test for argv[], envp[] was bogus
since those need not be in memory end-to-end, e.g.
in Tru64 they are aligned by eight. Loosen the test
so that 'contiguousness' is fulfilled if the elements
are within PTRSIZE alignment. This makes Tru64 to pass
the join.t, too.
p4raw-id: //depot/perl@19889
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -2372,13 +2372,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) pstat(PSTAT_SETCMD, un, len, 0, 0); } #endif - /* PL_origalen is set in perl_parse() to be the sum - * of the contiguous argv[] elements plus the size of - * the env in case that is contiguous with the argv[]. - * - * This means that in the worst case the area we are able - * to modify is limited to the size of the original argv[0]. - * --jhi */ + /* PL_origalen is set in perl_parse(). */ s = SvPV_force(sv,len); if (len >= (I32)PL_origalen) { /* Longer than original, will be truncated. */ @@ -2392,7 +2386,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) memset(PL_origargv[0] + len + 1, /* Is the space counterintuitive? Yes. * (You were expecting \0?) - * Does it work? Seems to. (In Linux at least.) + * Does it work? Seems to. (In Linux 2.4.20 at least.) * --jhi */ (int)' ', PL_origalen - len - 1); |