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

semop may write to read-only values

From:
Father Chrysostomos
Date:
December 23, 2013 05:44
Subject:
semop may write to read-only values
Message ID:
20131223054447.27827.qmail@lists-nntp.develooper.com
Except that what it writes is always the same value that it read.

http://www.nntp.perl.org/group/perl.perl5.porters/2001/07/msg39494.html
says:

> The following works (x86 and ARM) but I don't think I need to copy back
> the sembuf structure, as I don't *think* it's modified.
> However, nothing ever prototypes it as const. Odd

The patch was applied (248ff010a) with the copying-back
still in place.

This causes failures under the PERL_DEBUG_READONLY_COW mode I am work-
ing on.  I think it would be safe to remove the code that copies the
value back (based on the Darwin documentation of semop, and the fact
that perl has never documented that the input will change nor handled
it correctly if it can change).




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