|
2000-10-26
| ||
| 08:28 | • Closed ticket [218752ffff]: Tcl8.1 on OS/390: va_list is an array plus 4 oth... artifact: 98f83f9250 user: welch | |
| 01:04 | • New ticket [218752ffff]. artifact: 514b571f77 user: nobody | |
Tcl8.1 on OS/390: va_list is an array
Closed / Fixed218752ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:04:57
OriginalBugID: 1997 Bug
Version: 8.1
SubmitDate: '1999-05-06'
LastModified: '1999-05-07'
Severity: MED
Status: Released
Submitter: pat
ChangedBy: stanton
OS: Other
OSVersion: OS/390 4.0
Machine: NA
FixedDate: '1999-05-07'
FixedInVersion: 8.1.1
ClosedDate: '2000-10-25'
Name:
Christian Krone
ObservedBehavior:
Cite from the changes file:
> 3/9/99 (new feature) Integrated the stub library mechanism [...]
> - Added va_list versions of all VARARGS functions so they can be
> invoked from wrapper functions.
And these va_list functions - notably
tclStringObj.c:Tcl_AppendStringsToObjVA()
and tclResult.c:Tcl_AppendResultVA() - cannot be compiled on OS/390!
Both functions have the following code:
> va_list tmpArgList;
> [...]
> tmpArgList = argList;
On OS/390 va_list is declared as follow:
> typedef char *___valist[2];
> typedef ___valist va_list;
(an array of two char pointers, right?)
And the compiler generates the error:
> operand must be a modifiable lvalue.
DesiredBehavior:
It does compile with a memcpy:
> memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList));
Patch:
*** generic/tclStringObj.c.orgThu Apr 29 03:11:49 1999
--- generic/tclStringObj.cTue May 4 15:47:58 1999
***************
*** 429,435 ****
* bytes would be appended, just return.
*/
! tmpArgList = argList;
newLength = oldLength = objPtr->length;
while (1) {
string = va_arg(tmpArgList, char *);
--- 429,435 ----
* bytes would be appended, just return.
*/
! memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList));
newLength = oldLength = objPtr->length;
while (1) {
string = va_arg(tmpArgList, char *);
*** generic/tclResult.c.orgThu Apr 29 03:11:48 1999
--- generic/tclResult.cTue May 4 15:47:47 1999
***************
*** 475,481 ****
* Scan through all the arguments to see how much space is needed.
*/
! tmpArgList = argList;
newSpace = 0;
while (1) {
string = va_arg(tmpArgList, char *);
--- 475,481 ----
* Scan through all the arguments to see how much space is needed.
*/
! memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList));
newSpace = 0;
while (1) {
string = va_arg(tmpArgList, char *);
PatchFiles:
tclStringObj.c
tclResult.c
welch Closed ticket [218752ffff].
[History diff]2000-10-26 08:28:13
Log in (anonymous is fine) to add a comment.