View Issue Details

IDProjectCategoryView StatusLast Update
0000441LDMud 3.3Compilation, Installationpublic2018-01-29 22:57
ReporterGnomi Assigned Tolars 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi686OSDebian GNU/LinuxOS Version3.1
Product Version3.3.712 
Fixed in Version3.3.713 
Summary0000441: The tracedepth is not counted correctly
DescriptionHi,

I found two problems with the tracedepth counting. (I looked for it, because I got a trace with a tracedepth of up to -3659. This was the reason for a comm_fatal because of a too long message.)

In interpret.c int_call_lambda() creates for efun-closures a little program for the instruction with a return in it and calls it directly (without setup_new_frame). Because the return instruction decreases tracedepth, it has to be increased by one before calling eval_instruction.

In simulate.c execute_callback() uses apply() wich sets the tracedepth to zero. That may be okay for backend_callback, but not for apply_callback, and results in a negative tracedepth after the return from the callback.

Greetings,
Gnomi.
TagsNo tags attached.

Activities

2006-02-17 02:46

 

tracedepth.diff (995 bytes)   
Index: trunk.diverses/src/interpret.c
===================================================================
--- trunk.diverses/src/interpret.c	(Revision 2255)
+++ trunk.diverses/src/interpret.c	(Arbeitskopie)
@@ -17959,6 +17959,7 @@
 #ifdef USE_NEW_INLINES
                 inter_context = NULL;
 #endif /* USE_NEW_INLINES */
+                tracedepth++;
                 eval_instruction(code, sp);
                 /* The result is on the stack (inter_sp) */
                 return;
Index: trunk.diverses/src/simulate.c
===================================================================
--- trunk.diverses/src/simulate.c	(Revision 2255)
+++ trunk.diverses/src/simulate.c	(Arbeitskopie)
@@ -4047,7 +4047,10 @@
     }
     else
     {
-        if (!apply(cb->function.named.name, ob, num_arg + nargs))
+        if (toplevel)
+            tracedepth = 0;
+
+        if (!sapply(cb->function.named.name, ob, num_arg + nargs))
             transfer_svalue(&apply_return_value, &const0);
     }
 
tracedepth.diff (995 bytes)   

Gnomi

2006-02-17 02:47

manager   ~0000476

I attached a simple patch, that works in UNItopia (for a month).

lars

2006-02-21 01:45

reporter   ~0000479

The patch is correct - I implemented it in 3.3 and 3.2.

Issue History

Date Modified Username Field Change
2006-01-06 21:35 Gnomi New Issue
2006-02-17 02:46 Gnomi File Added: tracedepth.diff
2006-02-17 02:47 Gnomi Note Added: 0000476
2006-02-21 01:45 lars Status new => resolved
2006-02-21 01:45 lars Fixed in Version => 3.3.713
2006-02-21 01:45 lars Resolution open => fixed
2006-02-21 01:45 lars Assigned To => lars
2006-02-21 01:45 lars Note Added: 0000479
2007-10-06 21:55 lars Status resolved => closed
2010-11-16 10:42 lars Source_changeset_attached => ldmud.git master 07cb1687
2010-11-16 10:42 lars Source_changeset_attached => ldmud.git master-3.2 cf13749b
2018-01-29 19:59 lars Source_changeset_attached => ldmud.git master 07cb1687
2018-01-29 19:59 lars Source_changeset_attached => ldmud.git master-3.2 cf13749b
2018-01-29 22:57 lars Source_changeset_attached => ldmud.git master 07cb1687
2018-01-29 22:57 lars Source_changeset_attached => ldmud.git master-3.2 cf13749b