develooper Front page | perl.perl5.porters | Postings from May 2013

[perl #38402] Uninitialized value refs in drand48_r using clones

James E Keenan via RT
May 26, 2013 17:07
[perl #38402] Uninitialized value refs in drand48_r using clones
Message ID:
On Wed Feb 01 14:03:37 2006, jgmyers wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.35 running under perl v5.8.7.
> -----------------------------------------------------------------
> [Please enter your report here]
> perl_clone() copies PL_srand_called from the proto_perl, but when
> HAS_DRAND48_R is defined, fails to initialize
> PL_reentrant_buffer->_drand48_struct.  If perl_clone() is called with
> a
> proto_perl that has a nonzero PL_srand_called, this will cause rand()
> calls in the newly created clone to access the uninitialized
> _drand48_struct.
> The threads package works around this bug by always setting
> PL_srand_called to FALSE before calling perl_clone(), but perl_clone()
> itself should be fixed by initializing PL_srand_called to FALSE, not a
> value copied from proto_perl.

List:  Is there anyone familiar with the Perl guts and threads who could
take a crack at this older ticket?

Thank you very much.
Jim Keenan

via perlbug:  queue: perl5 status: new Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About