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

[csmith-project/csmith] 9a88a2: fix a bug in accessing union fields



  Branch: refs/heads/master
  Home:   https://github.com/csmith-project/csmith

  Commit: 9a88a2fe237c7e72a2feef7d2a75db9184c541f6
      https://github.com/csmith-project/csmith/commit/9a88a2fe237c7e72a2feef7d2a75db9184c541f6
  Author: Xuejun Yang <jxyang@cs.utah.edu>
  Date:   2011-08-15 (Mon, 15 Aug 2011)

  Changed paths:
    M src/FactUnion.cpp
  M src/Type.cpp
  M src/Variable.cpp
  M src/Variable.h

  Log Message:
  -----------
  fix a bug in accessing union fields

GCC and MSVC and Clang pack structs with bit-fields differently. So if a union has a field of packed struct type, and the struct has a bit-field, writing to a field after the bit-field has non-deterministic effect, thus makes all the union fields non-readable.