"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pod/perlhacktips.pod" between
perl-5.32.0-RC0.tar.xz and perl-5.32.0-RC1.tar.xz

About: Perl (Practical Extraction and Report Language) is a high-level, general-purpose, interpreted, dynamic programming language. Release candidate.

perlhacktips.pod  (perl-5.32.0-RC0.tar.xz):perlhacktips.pod  (perl-5.32.0-RC1.tar.xz)
skipping to change at line 1271 skipping to change at line 1271
valgrind allows to suppress such errors using suppression files. The valgrind allows to suppress such errors using suppression files. The
default suppression file that comes with valgrind already catches a lot default suppression file that comes with valgrind already catches a lot
of them. Some additional suppressions are defined in F<t/perl.supp>. of them. Some additional suppressions are defined in F<t/perl.supp>.
To get valgrind and for more information see To get valgrind and for more information see
http://valgrind.org/ http://valgrind.org/
=head2 AddressSanitizer =head2 AddressSanitizer
AddressSanitizer is a clang and gcc extension, included in clang since AddressSanitizer ("ASan") consists of a compiler instrumentation module
v3.1 and gcc since v4.8. It checks illegal heap pointers, global and a run-time C<malloc> library. ASan is available for a variety of
pointers, stack pointers and use after free errors, and is fast enough architectures, operating systems, and compilers (see project link below).
that you can easily compile your debugging or optimized perl with it. It checks for unsafe memory usage, such as use after free and buffer
It does not check memory leaks though. AddressSanitizer is available overflow conditions, and is fast enough that you can easily compile your
for Linux, Mac OS X and soon on Windows. debugging or optimized perl with it. Modern versions of ASan check for
memory leaks by default on most platforms, otherwise (e.g. x86_64 OS X)
this feature can be enabled via C<ASAN_OPTIONS=detect_leaks=1>.
To build perl with AddressSanitizer, your Configure invocation should To build perl with AddressSanitizer, your Configure invocation should
look like: look like:
sh Configure -des -Dcc=clang \ sh Configure -des -Dcc=clang \
-Accflags=-faddress-sanitizer -Aldflags=-faddress-sanitizer \ -Accflags=-fsanitize=address -Aldflags=-fsanitize=address \
-Alddlflags=-shared\ -faddress-sanitizer -Alddlflags=-shared\ -fsanitize=address \
-fsanitize-blacklist=`pwd`/asan_ignore
where these arguments mean: where these arguments mean:
=over 4 =over 4
=item * -Dcc=clang =item * -Dcc=clang
This should be replaced by the full path to your clang executable if it This should be replaced by the full path to your clang executable if it
is not in your path. is not in your path.
=item * -Accflags=-faddress-sanitizer =item * -Accflags=-fsanitize=address
Compile perl and extensions sources with AddressSanitizer. Compile perl and extensions sources with AddressSanitizer.
=item * -Aldflags=-faddress-sanitizer =item * -Aldflags=-fsanitize=address
Link the perl executable with AddressSanitizer. Link the perl executable with AddressSanitizer.
=item * -Alddlflags=-shared\ -faddress-sanitizer =item * -Alddlflags=-shared\ -fsanitize=address
Link dynamic extensions with AddressSanitizer. You must manually Link dynamic extensions with AddressSanitizer. You must manually
specify C<-shared> because using C<-Alddlflags=-shared> will prevent specify C<-shared> because using C<-Alddlflags=-shared> will prevent
Configure from setting a default value for C<lddlflags>, which usually Configure from setting a default value for C<lddlflags>, which usually
contains C<-shared> (at least on Linux). contains C<-shared> (at least on Linux).
=item * -fsanitize-blacklist=`pwd`/asan_ignore
AddressSanitizer will ignore functions listed in the C<asan_ignore>
file. (This file should contain a short explanation of why each of
the functions is listed.)
=back =back
See also See also
L<https://github.com/google/sanitizers/wiki/AddressSanitizer>. L<https://github.com/google/sanitizers/wiki/AddressSanitizer>.
=head1 PROFILING =head1 PROFILING
Depending on your platform there are various ways of profiling Perl. Depending on your platform there are various ways of profiling Perl.
There are two commonly used techniques of profiling executables: There are two commonly used techniques of profiling executables:
 End of changes. 6 change blocks. 
11 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)