This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_require thread safety for VMS.
authorCraig A. Berry <craigberry@mac.com>
Sat, 11 Aug 2012 02:25:09 +0000 (21:25 -0500)
committerCraig A. Berry <craigberry@mac.com>
Sat, 11 Aug 2012 02:25:09 +0000 (21:25 -0500)
commit155f4c250a9701391303ae7e38650ccff6f43b78
tree60b2d6faf22e11f8efbb903d383b79caabc2cf6f
parent1ebd3007591c91215bcc334318e0485e73e6f13f
pp_require thread safety for VMS.

When we translate path names of required modules into Unix format,
we haven't (recently) been using the optional second argument to
the translation routines,[1] an argument that supplies a buffer for
the translation.  That causes them to use a static buffer. Which
means that if two or more different threads are doing a require
operation at the same time, they will be blindly sharing the same
buffer.

So allocate buffers as we need them and make them mortal so they
will go away at the next state transition.

[1] Use of an automatic variable for the buffer was removed way
back in 46fc3d4c69a0ad.
pp_ctl.c