View Issue Details

IDProjectCategoryView StatusLast Update
0000431LDMud 3.3Runtimepublic2018-01-29 22:57
ReporterGnomi Assigned Tolars 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformi686OSDebian GNU/LinuxOS Version3.1
Product Version3.3.712 
Fixed in Version3.3.713 
Summary0000431: remove_interactive clears current_object, which results in a segfault
DescriptionHi,

In comm_fatal() remove_interactive() is called. remove_interactive() sets current_object to NULL, but comm_fatal() lets the current program continue with its execution and many functions assume that during the execution of a program current_object points to a real object and will thus crash with a segfault.
(comm_fatal() was called because of a message that was too long.) So I think, remove_interactive() should restore the previous current_object instead of setting it to NULL.

Happy New Year!
Gnomi
TagsNo tags attached.

Activities

2006-02-17 02:47

 

remove_interactive.diff (690 bytes)   
Index: trunk/src/comm.c
===================================================================
--- trunk/src/comm.c	(Revision 2255)
+++ trunk/src/comm.c	(Arbeitskopie)
@@ -3470,6 +3470,7 @@
 
 {
     object_t *save = command_giver;
+    object_t *curobj_save = current_object;
     int i;
     interactive_t *interactive;
     int save_privilege;
@@ -3636,7 +3637,8 @@
     free_object(ob, "remove_interactive");
 
     command_giver = check_object(save);
-    current_object = NULL;
+    current_object = curobj_save; /* No check_object, because there may
+                                     be execution going on. */
     malloc_privilege = save_privilege;
 } /* remove_interactive() */
 
remove_interactive.diff (690 bytes)   

Gnomi

2006-02-17 02:50

manager   ~0000477

I attached a simple patch, that we use in UNItopia (but we didn't have a comm_fatal since then).

lars

2006-02-21 01:18

reporter   ~0000478

The patch did just what was required - I applied it in 3.3 and 3.2.

Issue History

Date Modified Username Field Change
2006-01-06 17:49 Gnomi New Issue
2006-02-17 02:47 Gnomi File Added: remove_interactive.diff
2006-02-17 02:50 Gnomi Note Added: 0000477
2006-02-21 01:18 lars Status new => resolved
2006-02-21 01:18 lars Fixed in Version => 3.3.713
2006-02-21 01:18 lars Resolution open => fixed
2006-02-21 01:18 lars Assigned To => lars
2006-02-21 01:18 lars Note Added: 0000478
2007-10-06 21:55 lars Status resolved => closed
2010-11-16 10:42 lars Source_changeset_attached => ldmud.git master a9e3f7b9
2010-11-16 10:42 lars Source_changeset_attached => ldmud.git master-3.2 38871504
2018-01-29 19:59 lars Source_changeset_attached => ldmud.git master a9e3f7b9
2018-01-29 19:59 lars Source_changeset_attached => ldmud.git master-3.2 38871504
2018-01-29 22:57 lars Source_changeset_attached => ldmud.git master a9e3f7b9
2018-01-29 22:57 lars Source_changeset_attached => ldmud.git master-3.2 38871504