This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.
- From: David Miller <davem at davemloft dot net>
- To: mikestump at comcast dot net
- Cc: vries at codesourcery dot com, richard dot guenther at gmail dot com, gcc-patches at gcc dot gnu dot org, maxim at codesourcery dot com
- Date: Wed, 28 Sep 2011 18:43:04 -0400 (EDT)
- Subject: Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.
- References: <4E787543.1090009@codesourcery.com> <CE467A53-7ACD-4D42-A720-7DE022C18634@comcast.net>
From: Mike Stump <mikestump@comcast.net>
Date: Wed, 28 Sep 2011 15:19:10 -0700
> If Android is safe in this respect, then, they can just turn it on,
> and then force anyone porting software to their platform to `fix'
> their code.
They'd have to then know to turn this option off when building the kernel,
which does use such constructs extensively.
I think this whole idea has too many downsides to be considered seriously.
People write problems like this, lots of people. It's a pervasive
technique to encode boolean state into the low bits of a pointer or to
represent special "token" pointers using integers such as "-1".