[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] Floating-point support in csmith

Hi Shafiul,

Thanks for being interested in the floating-point support in Csmith!

On 2015-11-04 10:03, Shafiul Azam wrote:

 - I conducted a run of csmith 2.2.0 with --float argument on Ubuntu
10.04 (gcc 4.4.3). Number of crash-programs is significantly more now.
Running csmith without --float found 3 crash-bugs, while running with
--float found more than 300 crash-bugs within the (almost) same

I might be wrong, but I think those ~300 crash-bugs may contain dups, e.g., the GCC 4.4.3 on your Ubuntu might have a bug (possibly FP-related), which somehow was triggered by the majority of those ~300 bug-triggering tests?

I am interested to know current support-level for floating points, any
limitations and any future works you plan regarding float-point

The current floating-point support is pretty primitive. Csmith only generates a single floating-point type, float, and floating-point values of the float type. Floating-point variables/constants are mixed with integers in computation. When --float is supplied, Csmith can generate programs with undefined behaviors that are related to floating-point, e.g., converting a FP value to an integer can trigger overflow if the integer type can't hold the FP value. So, --float option is for crash bugs at the moment.

Thanks for your time!

Again, Thanks.

- Yang