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

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

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
April 18, 2019 08:16
Subject:
Re: [perl #134044] Current perl undefined C behaviors
Message ID:
20190418081601.GD6612@iabyn.com
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: https://rt.perl.org/Ticket/Display.html?id=134044 >
> 
> 
> 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:

    -fsanitize-blacklist=`pwd`/asan_ignore

-- 
Never work with children, animals, or actors.

Thread Previous | Thread Next


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