From: Robert Yang <liezhi.yang@windriver.com>
To: Paul Barker <paul@paulbarker.me.uk>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] util-linux-native: fix qsort_r for CentOS 5.10
Date: Thu, 3 Apr 2014 10:31:17 +0800 [thread overview]
Message-ID: <533CC7F5.3040702@windriver.com> (raw)
In-Reply-To: <CANyK_8cJVwOJZR5Gox6HNr5tV-=kmhWBQkPFOcz-bsHpGHBR4w@mail.gmail.com>
On 04/03/2014 01:31 AM, Paul Barker wrote:
> On 1 April 2014 14:48, Robert Yang <liezhi.yang@windriver.com> wrote:
>>
>>
>> On 04/01/2014 08:34 PM, Paul Barker wrote:
>>>
>>> On 1 April 2014 13:31, Phil Blundell <pb@pbcl.net> wrote:
>>>>
>>>> On Tue, 2014-04-01 at 12:41 +0100, Paul Barker wrote:
>>>>>
>>>>> The more I look at it the more I don't like this patch. It's probably
>>>>> a very rarely used code path but it could blow up if it's called. C
>>>>> provides no guarantees that calling a 3-argument function with only 2
>>>>> arguments will work. Depending on calling convention it could easily
>>>>> result in stack corruption on some platforms.
>>>>>
>>>>> I'd suggest we try reverting the relevant bits of the upstream change
>>>>> from qsort to
>>>>> qsort_r:
>>>>> http://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
>>>>>
>>>>> I think it should just be the first 3 patch hunks in that commit.
>>>>
>>>>
>>>> It seems vanishingly unlikely that anybody is seriously going to try to
>>>> use fdisk from util-linux-native to manipulate Sun partition tables and,
>>>> that being the case, it's presumably going to be quite hard to test any
>>>> such change. Maybe we should just turn off support for these fringe
>>>> partition table types altogether.
>>>>
>>>
>>> That may be a much, much easier fix.
>>
>>
>> Thank you very much, I will send a patch later:-)
>>
>
> Sorry to confuse the matter further but it seems Khem has also made a
> fix for this which removes qsort_r in a more reliable way, along with
> removing a few other non-posix compliant bits:
> http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/musl&id=0e0d93d8d5fdcdc9cbcd9da2be1d0193a06d3188
>
Yes, it works, thanks.
// Robert
> I'm happy with that fix, could you let me know if it works for you Robert?
>
prev parent reply other threads:[~2014-04-03 2:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 7:01 [PATCH 0/1] util-linux-native: fix qsort_r for CentOS 5.10 Robert Yang
2014-03-26 7:01 ` [PATCH 1/1] " Robert Yang
2014-03-31 21:22 ` Paul Barker
2014-04-01 1:34 ` Robert Yang
2014-04-01 11:41 ` Paul Barker
2014-04-01 12:31 ` Phil Blundell
2014-04-01 12:34 ` Paul Barker
2014-04-01 13:48 ` Robert Yang
2014-04-02 17:31 ` Paul Barker
2014-04-03 2:31 ` Robert Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533CC7F5.3040702@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul@paulbarker.me.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox