[Xorp-hackers] xorpsh crash

Ben Greear greearb at candelatech.com
Fri Oct 12 13:52:17 PDT 2007


The _node copy constructor does not seem to be implemented,
so it's just doing a blind copy of members, including the _list.
Maybe this is keeping us from unregistering properly.

The patch below makes it crash somewhere else, at least.
I'm not sure if the new crash is because of the fix below
or if the bug was always there.

I'm going to try to use the 'valgrind' tool to figure out
where the memory corruption is occuring...


RCS file: /cvs/xorp/cli/cli_node_net.cc,v
retrieving revision 1.65
diff -u -r1.65 cli_node_net.cc
--- cli_node_net.cc     12 Oct 2007 07:53:45 -0000      1.65
+++ cli_node_net.cc     12 Oct 2007 20:48:54 -0000
@@ -896,6 +896,9 @@
      // XXX: Schedule the processing after 10ms to avoid increasing
      // the CPU usage.
      //
+    // Unschedule before we copy over the list pointer, etc.
+    _process_pending_input_data_timer.unschedule();
+
      _process_pending_input_data_timer = eventloop.new_oneoff_after(
         TimeVal(0, 10),
         cb,


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list