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

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

Thread Previous
Karl Williamson
April 18, 2019 16:39
Re: [perl #134044] Current perl undefined C behaviors
Message ID:
On 4/18/19 2:16 AM, Dave Mitchell via RT wrote:
> 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:
>      -fsanitize-blacklist=`pwd`/asan_ignore

I did that, thank you, and it reduced the failures to the ones in the 
attached patch

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