develooper Front page | perl.perl5.porters | Postings from March 2007

pmdynflags and thread safety

Thread Next
Nicholas Clark
March 31, 2007 15:40
pmdynflags and thread safety
Message ID:
struct pmop {
    U32		op_pmflags;
    U32		op_pmpermflags;
    U8		op_pmdynflags;

and yet in pp_match I see things like

	PL_curpm = pm;
	if (dynpm->op_pmflags & PMf_ONCE)
	    dynpm->op_pmdynflags |= PMdf_USED;

This is modifying the optree, isn't it?

And that is bad and wrong, isn't it?

(the reason *I* am looking at this is that there is a U8 there, which is
padding the struct up to 60 bytes on ILP32, and if there's a way of getting
it to share the space with the two U32s, then the struct drops to 56 bytes)

Nicholas Clark

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About