develooper Front page | perl.perl5.porters | Postings from April 2019

Re: [perl #134044] Current perl undefined C behaviors

Thread Previous | Thread Next
Dave Mitchell
April 18, 2019 08:16
Re: [perl #134044] Current perl undefined C behaviors
Message ID:
On Wed, Apr 17, 2019 at 07:56:02PM -0700, karl williamson (via RT) wrote:
> # New Ticket Created by  karl williamson 
> # Please include the string:  [perl #134044]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >
> I ran clang sanitize=undefined on current perl blead.
> Attached is a file containing the failures.  It is in the form of a 
> patch (not intended to be applied) of a typical error message from asan 
> as a comment preceding the line where the problem occurs in the code.
> On #irc, Tony Cook pointed out that probably the integer overflows are 
> ok due to our use of -fwrapv.


> @@ -2618,6 +2631,9 @@ PP(pp_i_multiply)

Note that in general we expect the 'use integer' variants of the
arithmetic functions to have have undefined behaviour because it's kind of
what they're documented to do.

There's a file in the top-level dir of the perl src: asan_ignore,
which is designed to tell ASan what functions to ignore for errors.
You need to invoke clang with something like:


Never work with children, animals, or actors.

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