This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for fc33dad25ea/#114020
[perl5.git] / pod / perlhacktips.pod
index 91ef14a..3032bb2 100644 (file)
@@ -1172,8 +1172,9 @@ Windows.
 To build perl with AddressSanitizer, your Configure invocation should
 look like:
 
-    sh Configure -des -Dcc=clang -Accflags=-faddress-sanitizer \
-     -Aldflags=-faddress-sanitizer -Alddlflags=-faddress-sanitizer
+    sh Configure -des -Dcc=clang \
+       -Accflags=-faddress-sanitizer -Aldflags=-faddress-sanitizer \
+       -Alddlflags=-shared\ -faddress-sanitizer
 
 where these arguments mean:
 
@@ -1192,13 +1193,12 @@ Compile perl and extensions sources with AddressSanitizer.
 
 Link the perl executable with AddressSanitizer.
 
-=item * -Alddlflags=-faddress-sanitizer
+=item * -Alddlflags=-shared\ -faddress-sanitizer
 
-Link dynamic extensions with AddressSanitizer.
-
-If you also pass C<-Duseshrplib> to Configure in order to build a
-shared perl library, then you must replace this by
-C<-Alddlflags=-shared\ -faddress-sanitizer>.
+Link dynamic extensions with AddressSanitizer. You must manually
+specify C<-shared> because using C<-Alddlflags=-shared> will prevent
+Configure from setting a default value for C<lddlflags>, which usually
+contains C<-shared> (at least on linux).
 
 =back
 
@@ -1460,10 +1460,9 @@ L<perlclib>.
 
 Under ithreads the optree is read only. If you want to enforce this, to
 check for write accesses from buggy code, compile with
-C<-DPL_OP_SLAB_ALLOC> to enable the OP slab allocator and
 C<-DPERL_DEBUG_READONLY_OPS> to enable code that allocates op memory
-via C<mmap>, and sets it read-only at run time. Any write access to an
-op results in a C<SIGBUS> and abort.
+via C<mmap>, and sets it read-only when it is attached to a subroutine. Any
+write access to an op results in a C<SIGBUS> and abort.
 
 This code is intended for development only, and may not be portable
 even to all Unix variants. Also, it is an 80% solution, in that it
@@ -1473,13 +1472,14 @@ isn't able to make all ops read only. Specifically it
 
 =item * 1
 
-Only sets read-only on all slabs of ops at C<CHECK> time, hence ops
-allocated later via C<require> or C<eval> will be re-write
+Does not apply to op slabs belonging to C<BEGIN> blocks.
 
 =item * 2
 
 Turns an entire slab of ops read-write if the refcount of any op in the
-slab needs to be decreased.
+slab needs to be increased or decreased.  This means that anonymous
+closures will never have read-only ops, and thread creation will make all
+existing ops read-write.
 
 =item * 3
 
@@ -1492,9 +1492,8 @@ It's not possible to turn the slabs to read-only after an action
 requiring read-write access, as either can happen during op tree
 building time, so there may still be legitimate write access.
 
-However, as an 80% solution it is still effective, as currently it
-catches a write access during the generation of F<Config.pm>, which
-means that we can't yet build F<perl> with this enabled.
+However, as an 80% solution it is still effective, as currently it catches
+the setting of breakpoints in the debugger and some XSUB definitions.
 
 =head2 The .i Targets