laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day Rob, Thanks for advising of this proposal. I was wondering about the taint-related overhead. I'm not an XS programmer; however, I did some investigation using Devel::Peek and followed that up with some hunting around in perlguts. I'm genuinely interested in learning about this. My investigations are potentially incomplete and my inferences could easily be wrong. Any constructive criticism would be welcome. Without any implicit (setuid/getuid) or explicit (-T) taint checking:
So, ignoring the hex numbers — which I assumed were related to memory locations, like HASH(0x800003c88), ARRAY(0x800003cd0), etc. — and the values directly related to the string content, it would seem that the elements taking part in any overhead are SV = PVMG (cf. SV = PV) and the additional IV and NV. I wasn't able to figure out exactly what that overhead might be. Now, I could be barking up the wrong tree, which is entirely possible, and, if so, please correct my conclusions. It seems there is no overhead unless there are tainted variables. Is there something else going on that I've overlooked or, perhaps, that I'm simply unaware of? For comparison and completeness, here's the Devel::Peek output when -T is used:
There's no change for the untainted $x. The tainted version has additional FLAGS and a new MAGIC section. I had found PERL_MAGIC_taint in perlguts and originally thought that was related to PVMG (but maybe that's wrong). — Ken In reply to Re: Proposed change regarding "Taint" support [overhead]
by kcott
|
|