This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] elf.h SHF_EXCLUDE signed int 31 bit shift triggers undefined behaviour.
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: Mark Wielaard <mjw at redhat dot com>, "libc-alpha\ at sourceware dot org" <libc-alpha at sourceware dot org>, Josh Stone <jistone at redhat dot com>
- Date: Tue, 24 Mar 2015 20:53:17 +0100
- Subject: Re: [PATCH] elf.h SHF_EXCLUDE signed int 31 bit shift triggers undefined behaviour.
- Authentication-results: sourceware.org; auth=none
- References: <1427193579-26102-1-git-send-email-mjw at redhat dot com> <55117118 dot 1080706 at arm dot com> <20150324195038 dot GH10761 at vapier>
* Mike Frysinger:
> On 24 Mar 2015 14:13, Szabolcs Nagy wrote:
>> On 24/03/15 10:39, Mark Wielaard wrote:
>> > Any use of SHF_EXCLUDE in code that tries to check it against sh_flags
>> > will trigger undefined behaviour because it is defined as a 31 bit shift
>> > against an signed integer. Fix by explicitly using an unsigned int.
>> there is another proposed patch for this
>> > ChangeLog | 4 ++++
>> > elf/elf.h | 2 +-
>> > 2 files changed, 5 insertions(+), 1 deletion(-)
>> i think changelog entries are supposed to be submitted separately
> nope ... should be same commit
There used be an expectation that the ChangeLog update was not to be
submitted as part of the patch, but as a separate item in the patch
submission (not as a diff hunk, not with + prefix).
Has this changed? It would certainly make things simpler for me. :)