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

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

From:
James E Keenan via RT
Date:
May 26, 2013 17:07
Subject:
[perl #38402] Uninitialized value refs in drand48_r using clones
Message ID:
rt-3.6.HEAD-2650-1369588066-422.38402-15-0@perl.org
On Wed Feb 01 14:03:37 2006, jgmyers wrote:
> 
> This is a bug report for perl from jgmyers@pong.us.proofpoint.com,
> 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
https://rt.perl.org:443/rt3/Ticket/Display.html?id=38402



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About