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

Re: [csmith-dev] Unions, bitfields, and reading bits that have not been initialized



Hi Pascal,

 

I believe the bug is fixed in commit  01a938. Thanks.

 

-Xuejun

 

From: Xuejun Yang [mailto:jxyang@cs.utah.edu]
Sent: Saturday, July 30, 2011 6:02 PM
To: 'Pascal Cuoq'
Subject: RE: [csmith-dev] Unions, bitfields, and reading bits that have not been initialized

 

Thanks. That’s indeed a Csmith bug due to overlook of compound assignments. I am fixing it. Thanks for the bug report.

 

-Xuejun

 

 

From: Pascal Cuoq [mailto:pascal.cuoq@gmail.com]
Sent: Saturday, July 30, 2011 5:54 AM
To: Xuejun Yang
Subject: Re: [csmith-dev] Unions, bitfields, and reading bits that have not been initialized

 

Hello,

On Tue, Jul 26, 2011 at 10:52 PM, Xuejun Yang <jxyang@cs.utah.edu> wrote:

 However a bug at generation time caused the undefined test case. I have already fix the bug in a later revision. Please  verify.

 

The attached program, generated by today's github version (9cb30e720dcb6f072340), exhibits the same behavior.

 

At line 89, l_79.f2 is accessed at a time when only the smaller l_79.f0 has been initialized.

l_79 is of type union U3.

 

struct S0 {

   int8_t  f0;

};

 

union U3 {

   struct S0  f0;

   uint32_t  f1;

   int32_t  f2;

};

 

Pascal