Bus error in OldMathFuncProc on HP PA-RISC architecture
Closed / Duplicate1851524fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2007-12-15 21:09:25
Hi!
The following test fails with bus error on HP PA-RISC architecture (tcl HEAD as for 2007-12-15 was built on Debian Linux):
test expr-15.10 {CompileMathFuncCall: call registered math function} {testmathfunctions} {
expr T3(21.2, 37)
} 37.0
from expr.test.
The following assignment causes it:
args[k].doubleValue = d;
(it's line 3160 in tclBasic.c, branch TCL_DOUBLE in function OldMathFuncProc).
It arises while argument 21.2 is processed. Variable d has value 21.2 there, args[k].type assignment works fine.
the backtrace is:
#0 0x402de734 in OldMathFuncProc () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#1 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#2 0x4032c744 in TclExecuteByteCode () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#3 0x40335640 in Tcl_ExprObj () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#4 0x402ecd38 in Tcl_ExprObjCmd () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#5 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#6 0x402e0b88 in TclEvalEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#7 0x402e0028 in Tcl_EvalEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#8 0x402e1624 in TclEvalObjEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#9 0x402e11fc in Tcl_EvalObjEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#10 0x40378798 in Tcl_UplevelObjCmd () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#11 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#12 0x4032c744 in TclExecuteByteCode () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#13 0x40377c90 in TclObjInterpProcCore () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#14 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#15 0x402dfd64 in Tcl_EvalObjv () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#16 0x402e150c in TclEvalObjEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#17 0x402e11fc in Tcl_EvalObjEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#18 0x40378798 in Tcl_UplevelObjCmd () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#19 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#20 0x4032c744 in TclExecuteByteCode () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#21 0x40377c90 in TclObjInterpProcCore () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#22 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#23 0x402dfd64 in Tcl_EvalObjv () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#24 0x402e150c in TclEvalObjEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#25 0x402e11fc in Tcl_EvalObjEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#26 0x40378798 in Tcl_UplevelObjCmd () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#27 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#28 0x4032c744 in TclExecuteByteCode () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#29 0x40377c90 in TclObjInterpProcCore () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#30 0x4035e420 in InvokeImportedCmd () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#31 0x402df618 in TclEvalObjvInternal () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#32 0x402e0b88 in TclEvalEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#33 0x402e0028 in Tcl_EvalEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#34 0x4035696c in Tcl_FSEvalFileEx () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#35 0x4035da7c in Tcl_Main () from /home/sgolovan/debian/tcl/unix/libtcl8.5.so
#36 0x0001536c in main ()
BTW, any attempt to use args[k].doubleValue for debug printing or so gives the same bus error.
teopetukplain2007-12-16 16:04:56
Logged In: YES
user_id=410366
Originator: YES
If I remove args allocation
args = (Tcl_Value *)
TclStackAlloc(interp, dataPtr->numArgs * sizeof(Tcl_Value));
and simply replace it by an array of args (declaring Tcl_Value args[5]; instead of Tcl_Value *args;) bus error is gone. So, this bug seems to be somewhere in TclStackAlloc or GrowEvaluationStack.
msoferplain2007-12-16 17:25:57
Logged In: YES user_id=148712 Originator: NO Would it be possible to produce a stack trace in a symbols build?
msofer Ticket [1851524fff]: 2 changes
[History diff]2007-12-16 17:29:11
msoferplain2007-12-16 19:53:51
Logged In: YES user_id=148712 Originator: NO This is likely an effect of [Bug 1851832]
msoferplain2007-12-17 02:28:24
Logged In: YES user_id=148712 Originator: NO Testing shows that the patch at 1851832 fixes this issue. Even though the patch is not yet committed, I'm closing this bug as a "duplicate" of the other (would need a category "symptom" instead)
Log in (anonymous is fine) to add a comment.