[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roland Mainz
"Roger A. Faulkner" wrote:
> > "Roger A. Faulkner" wrote:
> > > > Roland Mainz wrote:
> > > > > This is a sponsor request to "fix" ([1]) CR #6799167
> > > > > (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> > > > > build fails in libshell").
> > > > >
> > > > > [1]=The "fix" is more a workaround since I don't know exactly how the
> > > > > ctf*-tools can be fixed.
> > > > >
> > > > > My contributor ID is "OS0025".
> > > > >
> > > > > Webrev follows later when my "hg clone" is complete...
> > > >
> > > > Webrev is now available at
> > > > http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/ -
> > > > can anyone give me a short code review for the change, please (we'll
> > > > file a new bug in bugster to make sure the original issues doesn't get
> > > > forgotten) ?
> > >
> > > The code change looks good to me (and compiles for me).
> > > (I've been concerned about the not-buildable-with-gcc
> > > issue for some time now.  I thought I was the only one.)
> >
> > It was AFAIK the only one (there are other VLA users in the tree but
> > they all use the arithmetric expressions and therefore avoid this
> > xxx@@@!!!-trap).
> >
> > > Nit:
> > > Could you break the comment into more than one line,
> > > to make it fit in 80-columns, something like:
> > >
> > > /*
> > >  * Allocate one extra array entry as workaround for:
> > >  *  CR 6799167 real gcc build fails in libshell
> > >  */
> >
> > Fixed. I've uploaded the new webrev as
> > http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_002/
> 
> Beautiful.  Thanks.

For the log:
I've filed CR #6811985 ('"ctfconvert" fails when gcc x86 executable uses
"VLA" (="Variable Length Array")') to get the bug in "ctfconvert" fixed
(see attached email, too).



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
-- next part --
An embedded message was scrubbed...
From: bugmail-sen...@sun.com
Subject: CR 6811985 Created, P2 opensolaris/triage-queue "ctfconvert" fails
when gcc x86 executable uses "VLA" (="Variable Length Array")
Date: Mon, 2 Mar 2009 11:51:47 -0700 (MST)
Size: 6017
URL: 



[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roland Mainz
John Sonnenschein wrote:
> On 2-Mar-09, at 10:05 AM, Roger A. Faulkner wrote:
> >> Roland Mainz wrote:
[snip]
> > Nit:
> > Could you break the comment into more than one line,
> > to make it fit in 80-columns, something like:
> >
> >/*
> > * Allocate one extra array entry as workaround for:
> > *  CR 6799167 real gcc build fails in libshell
> > */
> 
> Sorry to butt in here, but I was under the impression that code should
> never make reference to the bug it fixes. Am I mistaken here?

No, you're right... but AFAIK there is an exception when you add a
workaround which is expected to be removed (at least there is sufficient
precedent in usr/src/uts/ for this kind of comments). IMO no _permanent_
code should contain such comments but the workarounds need such stuff
(to avoid excessively large comment blocks) that there is a clear sign
why it was done this way...



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)



[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roland Mainz
"Roger A. Faulkner" wrote:
> > Roland Mainz wrote:
> > > This is a sponsor request to "fix" ([1]) CR #6799167
> > > (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> > > build fails in libshell").
> > >
> > > [1]=The "fix" is more a workaround since I don't know exactly how the
> > > ctf*-tools can be fixed.
> > >
> > > My contributor ID is "OS0025".
> > >
> > > Webrev follows later when my "hg clone" is complete...
> >
> > Webrev is now available at
> > http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/ -
> > can anyone give me a short code review for the change, please (we'll
> > file a new bug in bugster to make sure the original issues doesn't get
> > forgotten) ?
> 
> The code change looks good to me (and compiles for me).
> (I've been concerned about the not-buildable-with-gcc
> issue for some time now.  I thought I was the only one.)

It was AFAIK the only one (there are other VLA users in the tree but
they all use the arithmetric expressions and therefore avoid this
xxx@@@!!!-trap).

> Nit:
> Could you break the comment into more than one line,
> to make it fit in 80-columns, something like:
> 
> /*
>  * Allocate one extra array entry as workaround for:
>  *  CR 6799167 real gcc build fails in libshell
>  */

Fixed. I've uploaded the new webrev as
http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_002/



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)



[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread John Levon
On Mon, Mar 02, 2009 at 11:01:54AM -0800, Garrett D'Amore wrote:

> John Sonnenschein wrote:
> >Sorry to butt in here, but I was under the impression that code should 
> >never make reference to the bug it fixes. Am I mistaken here?
> 
> Normally yes.  However in this case, I think since the "workaround" may 
> need some explanation, its not a bad idea to reference it.

The correct CR is:

6379193 ctfconvert needs to support VLA for gcc's DWARF  

(which I just duped the new one to)

regards
john



[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roland Mainz
Roland Mainz wrote:
> This is a sponsor request to "fix" ([1]) CR #6799167
> (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> build fails in libshell").
> 
> [1]=The "fix" is more a workaround since I don't know exactly how the
> ctf*-tools can be fixed.
> 
> My contributor ID is "OS0025".
> 
> Webrev follows later when my "hg clone" is complete...

Webrev is now available at
http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/ -
can anyone give me a short code review for the change, please (we'll
file a new bug in bugster to make sure the original issues doesn't get
forgotten) ?



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)



[request-sponsor] Requesting sponsor for CR #6799167("real gcc build fails in libshell") ...

2009-03-02 Thread Roland Mainz
Milan Jurik wrote:
> Roland Mainz pe v po 02. 03. 2009 v 05:38 +0100:
> > This is a sponsor request to "fix" ([1]) CR #6799167
> > (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> > build fails in libshell").
> >
> > [1]=The "fix" is more a workaround since I don't know exactly how the
> > ctf*-tools can be fixed.
> >
> > My contributor ID is "OS0025".
> >
> > Webrev follows later when my "hg clone" is complete...
>
> I will sponsor it (if it's ksh93 issue).

It's an issue in the ctf*-tools but we failed to find a fix for these
tools for more than a month and IMO breaking the gcc build for such a
long time IMO not acceptable. Since I don't know how to fix the ctf
tools the patch in
http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/
works around the problem by using an arithmetric expression in the VLA
declaration which seems to work in this case.

To explain the workaround: The following testcase causes "ctfconvert" to
fail with the error "die 8002: failed to get unsigned (form 0x13)":
-- snip --
#include 
#include 
#include 

int main(int ac, char *av[])
{
   int len=strlen(av[0])+1;
   char name[len];

   strcpy(name, av[0]);

   printf("name='%s'\n", name);

   return EXIT_SUCCESS;
}
-- snip --

The problem goes away if I replace the first two lines of the |main()|
function like this...
-- snip --
   int len=strlen(av[0]);
   char name[len+1];
-- snip --
... e.g. VLA declarations seem to work if you use an arithemtric
expression instead of a plain variable... but I can't explain _why_ this
works... ;-(



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)



[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Garrett D'Amore
John Sonnenschein wrote:
> Sorry to butt in here, but I was under the impression that code should 
> never make reference to the bug it fixes. Am I mistaken here?

Normally yes.  However in this case, I think since the "workaround" may 
need some explanation, its not a bad idea to reference it.

 - Garrett

>
> -JohnS
> On 2-Mar-09, at 10:05 AM, Roger A. Faulkner wrote:
>
>>
>>> Date: Mon, 02 Mar 2009 16:20:44 +0100
>>> From: Roland Mainz 
>>> Subject: Re: [request-sponsor] Requesting sponsor for CR #6799167 
>>> ("real gcc
>> build fails in libshell") ...
>>> To: "request-sponsor at opensolaris.org" 
>>> , Milan
>> Jurik , ksh93-integration-discuss
>> 
>>>
>>> Roland Mainz wrote:
>>>> This is a sponsor request to "fix" ([1]) CR #6799167
>>>> (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
>>>> build fails in libshell").
>>>>
>>>> [1]=The "fix" is more a workaround since I don't know exactly how the
>>>> ctf*-tools can be fixed.
>>>>
>>>> My contributor ID is "OS0025".
>>>>
>>>> Webrev follows later when my "hg clone" is complete...
>>>
>>> Webrev is now available at
>>> http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/ -
>>> can anyone give me a short code review for the change, please (we'll
>>> file a new bug in bugster to make sure the original issues doesn't get
>>> forgotten) ?
>>
>> The code change looks good to me (and compiles for me).
>> (I've been concerned about the not-buildable-with-gcc
>> issue for some time now.  I thought I was the only one.)
>>
>> Nit:
>> Could you break the comment into more than one line,
>> to make it fit in 80-columns, something like:
>>
>>/*
>> * Allocate one extra array entry as workaround for:
>> *  CR 6799167 real gcc build fails in libshell
>> */
>>
>> Thanks,
>> Roger
>>
>> ___
>> request-sponsor mailing list
>> request-sponsor at opensolaris.org
>
> ___
> request-sponsor mailing list
> request-sponsor at opensolaris.org




[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread John Beck
JohnS> ... I was under the impression that code should
JohnS> never make reference to the bug it fixes. Am I mistaken here?

No, you are quite correct.  Referring to an open bug e.g.:

/*
 * Work around silly misfeature until 699 is fixed.
 */

is OK, but the comment proposed in this case is not.  Something like:

/*
 * Allocate one extra array entry to keep gcc happy.
 */

should suffice.

-- John

http://blogs.sun.com/jbeck



[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread John Sonnenschein
Sorry to butt in here, but I was under the impression that code should  
never make reference to the bug it fixes. Am I mistaken here?

-JohnS
On 2-Mar-09, at 10:05 AM, Roger A. Faulkner wrote:

>
>> Date: Mon, 02 Mar 2009 16:20:44 +0100
>> From: Roland Mainz 
>> Subject: Re: [request-sponsor] Requesting sponsor for CR #6799167  
>> ("real gcc
> build fails in libshell") ...
>> To: "request-sponsor at opensolaris.org" > >, Milan
> Jurik , ksh93-integration-discuss
> 
>>
>> Roland Mainz wrote:
>>> This is a sponsor request to "fix" ([1]) CR #6799167
>>> (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
>>> build fails in libshell").
>>>
>>> [1]=The "fix" is more a workaround since I don't know exactly how  
>>> the
>>> ctf*-tools can be fixed.
>>>
>>> My contributor ID is "OS0025".
>>>
>>> Webrev follows later when my "hg clone" is complete...
>>
>> Webrev is now available at
>> http://cr.opensolaris.org/~gisburn/ 
>> ksh93_integration_cr_6799167_001/ -
>> can anyone give me a short code review for the change, please (we'll
>> file a new bug in bugster to make sure the original issues doesn't  
>> get
>> forgotten) ?
>
> The code change looks good to me (and compiles for me).
> (I've been concerned about the not-buildable-with-gcc
> issue for some time now.  I thought I was the only one.)
>
> Nit:
> Could you break the comment into more than one line,
> to make it fit in 80-columns, something like:
>
>/*
> * Allocate one extra array entry as workaround for:
> *  CR 6799167 real gcc build fails in libshell
> */
>
> Thanks,
> Roger
>
> ___
> request-sponsor mailing list
> request-sponsor at opensolaris.org




[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roger A. Faulkner
> Date: Mon, 02 Mar 2009 19:17:31 +0100
> From: Roland Mainz 
> Subject: Re: [request-sponsor] Requesting sponsor for CR #6799167 ("real gcc 
build fails in libshell") ...
> To: "Roger A. Faulkner" 
> Cc: Milan.Jurik at sun.com, ksh93-integration-discuss at opensolaris.org, 
request-sponsor at opensolaris.org
> 
> "Roger A. Faulkner" wrote:
> > > Roland Mainz wrote:
> > > > This is a sponsor request to "fix" ([1]) CR #6799167
> > > > (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> > > > build fails in libshell").
> > > >
> > > > [1]=The "fix" is more a workaround since I don't know exactly how the
> > > > ctf*-tools can be fixed.
> > > >
> > > > My contributor ID is "OS0025".
> > > >
> > > > Webrev follows later when my "hg clone" is complete...
> > >
> > > Webrev is now available at
> > > http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/ -
> > > can anyone give me a short code review for the change, please (we'll
> > > file a new bug in bugster to make sure the original issues doesn't get
> > > forgotten) ?
> > 
> > The code change looks good to me (and compiles for me).
> > (I've been concerned about the not-buildable-with-gcc
> > issue for some time now.  I thought I was the only one.)
> 
> It was AFAIK the only one (there are other VLA users in the tree but
> they all use the arithmetric expressions and therefore avoid this
> xxx@@@!!!-trap).
> 
> > Nit:
> > Could you break the comment into more than one line,
> > to make it fit in 80-columns, something like:
> > 
> > /*
> >  * Allocate one extra array entry as workaround for:
> >  *  CR 6799167 real gcc build fails in libshell
> >  */
> 
> Fixed. I've uploaded the new webrev as
> http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_002/

Beautiful.  Thanks.

Go for it,
Roger




[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roger A. Faulkner

> Date: Mon, 02 Mar 2009 16:20:44 +0100
> From: Roland Mainz 
> Subject: Re: [request-sponsor] Requesting sponsor for CR #6799167 ("real gcc 
build fails in libshell") ...
> To: "request-sponsor at opensolaris.org"  opensolaris.org>, Milan 
Jurik , ksh93-integration-discuss 

> 
> Roland Mainz wrote:
> > This is a sponsor request to "fix" ([1]) CR #6799167
> > (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> > build fails in libshell").
> > 
> > [1]=The "fix" is more a workaround since I don't know exactly how the
> > ctf*-tools can be fixed.
> > 
> > My contributor ID is "OS0025".
> > 
> > Webrev follows later when my "hg clone" is complete...
> 
> Webrev is now available at
> http://cr.opensolaris.org/~gisburn/ksh93_integration_cr_6799167_001/ -
> can anyone give me a short code review for the change, please (we'll
> file a new bug in bugster to make sure the original issues doesn't get
> forgotten) ?

The code change looks good to me (and compiles for me).
(I've been concerned about the not-buildable-with-gcc
issue for some time now.  I thought I was the only one.)

Nit:
Could you break the comment into more than one line,
to make it fit in 80-columns, something like:

/*
 * Allocate one extra array entry as workaround for:
 *  CR 6799167 real gcc build fails in libshell
 */

Thanks,
Roger




[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Milan Jurik
Hi,

I will sponsor it (if it's ksh93 issue).

Best regards,

Milan

Roland Mainz p??e v po 02. 03. 2009 v 05:38 +0100:
> Hi!
> 
> 
> 
> This is a sponsor request to "fix" ([1]) CR #6799167
> (http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
> build fails in libshell").
> 
> [1]=The "fix" is more a workaround since I don't know exactly how the
> ctf*-tools can be fixed.
> 
> My contributor ID is "OS0025".
> 
> Webrev follows later when my "hg clone" is complete...
> 
> 
> 
> Bye,
> Roland
> 




[request-sponsor] Requesting sponsor for CR #6799167 ("real gcc build fails in libshell") ...

2009-03-02 Thread Roland Mainz

Hi!



This is a sponsor request to "fix" ([1]) CR #6799167
(http://bugs.opensolaris.org/view_bug.do?bug_id=6799167 - "real gcc
build fails in libshell").

[1]=The "fix" is more a workaround since I don't know exactly how the
ctf*-tools can be fixed.

My contributor ID is "OS0025".

Webrev follows later when my "hg clone" is complete...



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)