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

Re: [csmith-dev] wishlist: option to disable globals



Hi Yang!

On Fri, Jun 3, 2016 at 12:02 AM, Yang Chen <chenyang@cs.utah.edu> wrote:
> On 06/02/2016 04:27 PM, Jamey Sharp wrote:
>> I think I've found a bug in csmith, too. It isn't supposed to generate
>> C programs that have undefined behavior, right? ...
>
> Csmith-generated programs are supposed to be undefined-behavior-free. All
> shift operations are wrapped by functions (or macros) such as
> lshift_func_int8_t_s_s, which can be found in csmith/runtime/safe_math.h (or
> safe_math_macros.h). Those functions/macros ensure that relevant operations
> are "safe" (i.e., the program runs without undefined behavior).

Oh. I started off running csmith with --no-safe-math to avoid having
to deal with function calls right away, and forgot about it.
Nevermind!

Thanks,
Jamey