* test case against union aliasing
@ 2018-02-27 11:20 Andy Shevchenko
2018-02-27 13:30 ` Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2018-02-27 11:20 UTC (permalink / raw)
To: Julia Lawall; +Cc: Lukas Wunner, linux-kernel
Hi!
It seems we have some code in kernel which utilizes (rightlessly for
now) union aliasing.
So, can we create a test case against such? (Three steps: a) replace
union by struct keyword in data type in question, b) compile, c) run in
Qemu with proper functional test)
Does it make any sense?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: test case against union aliasing
2018-02-27 11:20 test case against union aliasing Andy Shevchenko
@ 2018-02-27 13:30 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2018-02-27 13:30 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Lukas Wunner, linux-kernel
On Tue, 27 Feb 2018, Andy Shevchenko wrote:
> Hi!
>
> It seems we have some code in kernel which utilizes (rightlessly for
> now) union aliasing.
>
> So, can we create a test case against such? (Three steps: a) replace
> union by struct keyword in data type in question, b) compile, c) run in
> Qemu with proper functional test)
>
> Does it make any sense?
I think so. If you want to do it more safely than with sed, it should be
possible with Coccinelle, with just
@@
identifier i;
@@
-union i
+struct i
julia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-27 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 11:20 test case against union aliasing Andy Shevchenko
2018-02-27 13:30 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).