[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Success in an SGI Origin 200 running IRIX6.4 and bug in libtclobjc
From: |
Gerardo Malazdrewicz |
Subject: |
Success in an SGI Origin 200 running IRIX6.4 and bug in libtclobjc |
Date: |
Tue, 15 Jul 1997 10:57:49 -0300 (GMT+3) |
Hello all!
Yes! I have a working Swarm in such machine, compiled with gcc
2.7.2.2 patched for using old_ld, tcl7.5 and tk4.1 installed in
/usr/lib and libtclobjc-1.1b6.
I compiled Tcl, Tk and BLT with native compiler, SGI_ABI=-32.
Binaries used to SEGFAULT, but I discovered the bug.
Seeing libtclobjc-1.1b6/tclObjc.m:
At line 38,OBJECTS_AS_TCL_COMMANDS is defined
38 #define OBJECTS_AS_TCL_COMMANDS 2
At lines 270-276, do_special_hack is set to 1
270 //
271 // We attempt to avoid the __builtin dynamic call entirely
272 // in a few common cases. For example, when all the arguments
273 // and the return value is either an object or an int.
274 //
275
276 int do_special_hack = 1 ;
At lines 506-537, retframe is defined ONLY IF !do_special_hackD
506 if(do_special_hack){
..................................
}
} else {
534 retframe = __builtin_apply((apply_t)method->method_imp,
(void*)argframe,
argsize);
}
And, at lines 565-566 retframe is used regardless of the value of
do_special_hack. I think close braces in line 562 should be moved after
the next #endif and reference to retframe in line 566 should be replaced
by one to returnedObject, but I'm not sure about the correct casting.
What do you think?
{
id returnedObject;
char * s;
if(do_special_hack)
returnedObject = (id) returnValue ;
else
returnedObject = getObjectReturn(retframe);
s = tclObjc_objectToName(returnedObject);
sprintf(resultString, s);
562 }
#if OBJECTS_AS_TCL_COMMANDS
if (!Tcl_GetCommandInfo(interp, resultString, &cmdInfo))
565 Tcl_CreateCommand(interp, resultString, tclObjc_msgSendToClientData,
*(id*)retframe, 0);
#else /* messages caught and forwarded by tcl proc "unknown" */
#endif
By now, I replaced defined do_special_hack = 0, but I don't know if
this hurts performance. Any advice will be welcomed!
Greetings,
Gerardo
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
==================================
- Success in an SGI Origin 200 running IRIX6.4 and bug in libtclobjc,
Gerardo Malazdrewicz <=