[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-dev] Using safe math headers in csmith
- To: John Regehr <regehr@cs.utah.edu>, "csmith-dev@flux.utah.edu" <csmith-dev@flux.utah.edu>
- Subject: Re: [csmith-dev] Using safe math headers in csmith
- From: "Even Mendoza, Karine" <k.even-mendoza@imperial.ac.uk>
- Date: Tue, 25 Feb 2020 11:17:35 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=imperial.ac.uk; dmarc=pass action=none header.from=imperial.ac.uk; dkim=pass header.d=imperial.ac.uk; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Eg8RJgGXnUcz4FixM7ucFDNBzCvqRnPZB9s6D28+PEI=; b=RMZMSlcWqs290YiETiqdk1IUj8xaQsWgqy4K27OutlcaVlzi00wP1cia+ZJsfDECPeR8xPR3BVBrvaBZSRXF/+RXOk86NxTREM9w+kds1weYqobdCY1UduQKHTlqB4WknFiSzuDRQeq5/76pbhWfoegxbkKGKflOYjKQRHv/ntMajy88zUiq9HrrIDINDrOfKXB9euJuWU0vwYUAAiE8H+AfTbWzai1Y8OpXz8/dZkOqH+HVeXSnioySvUThNS5svtSqyUyA6vXqlWf9yEJiqx2cxk4bK/zjt105SrmO//Sy7AB4M0s5X1GEq0cmiNOxfX7YHtYwNILH6dwOPBswiA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T8QZ4WSIzJ//sERX5/iggodJaDE/GVh2UIf5i0NvcV1H8Qo0cinoWg3Fjv3lJiKmZONUQe31WLlWGYSQ4iOi68w0+j+4YOzzijRbf91gaGgzXpCJdQ8pVv3NEe3oTxz4rzq2Q8e1INosR5pZ6UulhUVehMPg8xTlr9ODwihC1AtzX2RBhscC+KbZ89M0fr1nDeBKxdIAfShIK7CFFWsaj4Y6RQv1hWsrAfMbmh3qF0/2Ax2+QzUWt42kdIQLgDD93kR2GzwHHsLIODkOgaEoUskp+4SrvxuVcR1yYxFsoLYaXEHFp0RhCoZL8c0umN5WZrwBYf2TYOecAaU+T9NFyA==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=k.even-mendoza@imperial.ac.uk;
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=imperial.ac.uk; s=main01; h=MIME-Version:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Eg8RJgGXnUcz4FixM7ucFDNBzCvqRnPZB9s6D28+PEI=; b=qPkDtcaFr9WyR8Lr0p0ejoWS7O UAoR2Js2yUQXjDpyG8yVa3wLZc/6psb3ykycxVZD4O/PhT1G90Pnz2NJugIJpLJLnas6dW1iQ5Hnv IpwbDO1QehJZZp8HIokI1KSJSlXEjSak0UmnEheIp4EKZXiF6n4SbKA0hbQkvGGPMzv8=;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ImperialLondon.onmicrosoft.com; s=selector2-ImperialLondon-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Eg8RJgGXnUcz4FixM7ucFDNBzCvqRnPZB9s6D28+PEI=; b=QCNax3PBs+a1085o3Erinfh+vL9607BPOwe7OVoKELybErT4NwtVNqy+kYD9jPdRWAeUvabFHoGNvo4yqxTXhMu6/H7Mi9fWgdwrIuxHEHLOkuDx2y5WUQoTw4kkjKF/nAGVw/ulofZCSWfPyttnr+jJpBxQGZtm1hw0s5ZvOrc=
- In-reply-to: <10d3d574-d30e-0f59-f5e3-a28868d6f25f@cs.utah.edu>
- List-archive: </listarchives/csmith-dev>
- List-help: <mailto:csmith-dev-request@flux.utah.edu?subject=help>
- List-id: Csmith Development Mailing List <csmith-dev.flux.utah.edu>
- List-post: <mailto:csmith-dev@flux.utah.edu>
- List-subscribe: <http://www.flux.utah.edu/mailman/listinfo/csmith-dev>, <mailto:csmith-dev-request@flux.utah.edu?subject=subscribe>
- List-unsubscribe: <http://www.flux.utah.edu/mailman/options/csmith-dev>, <mailto:csmith-dev-request@flux.utah.edu?subject=unsubscribe>
- References: <AM6PR06MB6293A88C9A45945955FE12FEE7EC0@AM6PR06MB6293.eurprd06.prod.outlook.com> <AM6PR06MB629392CB8FEED29F15A6FE7CE7EC0@AM6PR06MB6293.eurprd06.prod.outlook.com> <cf008b8a-7727-58f6-5b93-c01d40f8eba2@cs.utah.edu> <10d3d574-d30e-0f59-f5e3-a28868d6f25f@cs.utah.edu>
- Thread-index: AdXq+9dNAnZ1LHJGQG+BqOPfGVCR3AAASzxAAAxW9IAAA3y7AAAkK+jg
- Thread-topic: [csmith-dev] Using safe math headers in csmith
Hi John,
Thank you much for the help and instructions. It does work for me now.
Another question I have is regarding the reason for providing both macro-based and function-based headers. Was it related to performance, undefined behaviour, or something else?
Thanks,
Karine
-----Original Message-----
From: csmith-dev-bounces@flux.utah.edu [mailto:csmith-dev-bounces@flux.utah.edu] On Behalf Of John Regehr
Sent: 24 February 2020 18:01
To: csmith-dev@flux.utah.edu
Subject: Re: [csmith-dev] Using safe math headers in csmith
*******************
This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender.
If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.
*******************
Hi Karine, ok, I looked into this. Both of these alternative header files appear to work just fine. If you want to use the NOTMP versions, you need to pass Csmith the additional --math-notmp flag.
I ran this shell script a few times and both versions always produced the same checksum:
./src/csmith > foo.c
clang -O0 -w foo.c -I../runtime -o foo1
clang -O0 foo.c -I../runtime -DUSE_MATH_MACROS -w -o foo2 ulimit -t 2
./foo1
./foo2
Let us know if anything doesn't work as advertised.
John
On 2/24/20 8:20 AM, John Regehr wrote:
> Hi Karine,
>
> Well, I just tried to compile a program using -DUSE_MATH_MACROS_NOTMP
> and it did not compile, so something must have gone wrong here. I
> assume the same thing happened when you tried this?
>
> I'll try to look into it soon.
>
> John
>
>
> On 2/24/20 2:28 AM, Even Mendoza, Karine wrote:
>> Hi,
>>
>> I would like to know if the version of csmith using the header
>> safe_math_macros.h or safe_math_macros_notmp.c is working.
>>
>> Can I use these headers instead of safe_math.h and expect the same
>> output for the generated programs?
>>
>> Thanks much,
>>
>> Karine
>>