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

[csmith-bugs] pragma pack and unions



On Sun, Aug 21, 2011 at 7:53 PM, Xuejun Yang <jxyang@cs.utah.edu> wrote:

This is an example that Csmith has to sacrifice expressiveness in order to maintain unambiguity:   How to allocate bit-fields is very much implementation dependent, and we found some differences among compilers.


Yes, it's a shame. In the case of Frama-C's value analysis for instance, the remaining unionizable structs can still find the same bugs that could occur with 8-bit, 16-bit and 32-bit bitfields. But there could perfectly be bugs in the value analysis that can only be found with structs sporting, for instance, 1-bit or 31-bit bitfields inside unions.

This said, bitfields aren't used much in our field of interest for the same reason that makes them annoying for comparative testing, so perhaps I should just learn to accept that we may have bugs there but they don't matter so much.

Pascal