stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Teleman <stefan.tele...@gmail.com>
Subject Re: STDCXX-1066 [was: Re: STDCXX forks]
Date Sun, 23 Sep 2012 22:47:04 GMT
On Sun, Sep 23, 2012 at 6:19 PM, Liviu Nicoara <nikkoara@hates.ms> wrote:
> On 9/23/12 5:23 PM, Stefan Teleman wrote:
>>
>> On Sun, Sep 23, 2012 at 4:58 PM, Liviu Nicoara <nikkoara@hates.ms> wrote:
>>
>>> Stefan, I stumbled upon this: http://tinyurl.com/ceet6ec and this:
>>> http://tinyurl.com/c4h9mgl
>>
>>
>> The first URL is Fujitsu. It doesn't mention anything about the
>> side-effects of KU-137111. It's just a description on how to apply
>> kernel patches.
>
>
> Hold on. If you go in the bottom half of that page you will see:
>
> *2) The following shows an example of programming that causes the
>           above problem.
>
>         <In the case where the problem occurs>
>           ----------------------------------------------------------------
>           int       *ip;
>           mutex_t   *mp;
>           ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
>           mp = (mutex_t *) (ip + 1);
>                              /* The address is used with a modification */
>           ----------------------------------------------------------------
>
>         <In the case where the problem does not occur -1>
>           ----------------------------------------------------------------
>           mutex_t   mp;                          /* Obtained statically */
>           ----------------------------------------------------------------
>
>         <In the case where the problem does not occur -2>
>           ----------------------------------------------------------------
>           mutex_t   *mp;
>           mp = (mutex_t *) malloc(sizeof (mutex_t));
>                        /* The address is used without any modifications */
>           ----------------------------------------------------------------

First of all, this is C. And it's using the mutex_t Solaris type directly.

We're in C++, where the pthread_mutex_t type is a data member of a
class. In some cases it's a pointer (such as __rw_guard). In some
other cases it's part of a derived type.

> I am not saying I don't believe you. But you have to give us something more
> than "trust me, I know what I'm doing". You have to admit that the patch
> looks funny, e.g., in that it does not follow the published documentation
> for Solaris Studio 12.3.

It doesn't look funny to me. It looks like it's working.

Exactly what is it that I should give you, other than a tested,
working, already in production patch? A different implementation which
doesn't "look funny"?

Even if such an implementation existed, we're not going to re-test it.
This has been tested once, and validated.

--Stefan

-- 
Stefan Teleman
KDE e.V.
stefan.teleman@gmail.com

Mime
View raw message