Skip to content

segfault

2 messages · Paul Gilbert, Peter Dalgaard

#
I've managed to trap the following segfault with xxgdb and gctorture() set. The
segfault seems to move around if gctorture() is not set, but has now occurred twice
in the same spot with it set.  xxgdb gives the message

Program received signal SIGSEGV, Segmentation fault.
0x71244 in RunGenCollect (size_needed=2) at memory.c:1027

and the source listing points to FORWARD_CHILDREN(s); in the following section from
src/main/memory.c

#ifndef EXPEL_OLD_TO_NEW
    /* scan nodes in uncollected old generations with old-to-new pointers */
    for (gen = num_old_gens_to_collect; gen < NUM_OLD_GENERATIONS; gen++)
 for (i = 0; i < NUM_NODE_CLASSES; i++)
     for (s = NEXT_NODE(R_GenHeap[i].OldToNew[gen]);
   s != R_GenHeap[i].OldToNew[gen];
   s = NEXT_NODE(s))
  FORWARD_CHILDREN(s);
#endif


I'm using
_
platform sparc-sun-solaris2.6
arch     sparc
os       solaris2.6
system   sparc, solaris2.6
status   Patched
major    1
minor    2.1
year     2001
month    02
day      06
language R

Paul Gilbert

P.S. If someone can quickly tell me the trick to make cut and paste work with xxgdb
in Solaris I would appreciate it. (I realize I should probably read the manual, but
if it is simple please let me know.)

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
This just shows that something corrupted the memory handling. The
actual bug is probably somewhat prior to this. If you do a "bt"
(backtrace) and go "up" a couple of times, you might find a spot where
someone forgot to PROTECT() a newly created R object.
I gave up on xxgdb long ago because I thought it was enough to have to
deal with bugs in our own programs! However, it would seem that the
ordinary mousing techniques works as usual on Linux. Command-line
recall appears to be shot, however.