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

[csmith-dev] assignments from incompatible pointer types

Hi all,

As you may remember I am trying to modify CSmith to use it to test floating point optimizations by producing an interval of where theoretically the float value should fall into at the end.

A problem that I've recently came across is that CSmith allows generation of assignments from incompatible pointers between float and other types. In my case this breaks the intervals when, for example, a pointer to int gets an address of a float interval (then modifying the value using that int pointer changes only the lower bound of interval struct).

Was this behavior intended or is it still to be fixed? For now I just abort when an incompatible pointer assignment is generated, this happens in around 30% of the programs.

I tried to prevent these assignments by modifying make_random in Lhs.cpp to take into account the type of the _expression_, and setting incompatible vars as invalid. This however led to CSmith getting stuck. Do you have any ideas of how I could fix that? I guess this goes a bit deeper into how CSmith works.

Yours sincerely

Jacek Burys