[Rd] (PR#1008) SIGSEGV under 1.1.1 too

Roger.Bivand@nhh.no Roger.Bivand@nhh.no
Tue, 3 Jul 2001 15:19:34 +0200 (MET DST)


It looks as though the problem isn't in R - I provoked a SIGSEGV under R
1.1.1 on RH62:

> for (i in 1:100) an1 <- ann(cbind(runif(1000), runif(1000)), k = 4)
> for (i in 1:100) an1 <- ann(cbind(runif(1001), runif(1001)), k = 4)

Program received signal SIGSEGV, Segmentation fault.
0x40111109 in chunk_free (ar_ptr=0x401a5d40, p=0x8849a30) at malloc.c:3111
3111    malloc.c: No such file or directory.
(gdb) bt
#0  0x40111109 in chunk_free (ar_ptr=0x401a5d40, p=0x8849a30) at
malloc.c:3111
#1  0x40110f9a in __libc_free (mem=0x8849a38) at malloc.c:3023
#2  0x4002c814 in _rl_free_history_entry () from /usr/lib/libreadline.so.3
#3  0x4002ac0f in readline_internal_teardown () from
/usr/lib/libreadline.so.3
#4  0x4003a07e in rl_callback_read_char () from /usr/lib/libreadline.so.3
#5  0x80e4a8f in Rstd_ReadConsole (prompt=0x40982210 "> ", 
    buf=0xbffff038 "for (i in 1:100) an1 <- ann(cbind(runif(1000),
runif(1000)), k = 4)\n", len=1024, addtohistory=1) at sys-std.c:376
#6  0x80e2b6e in R_ReadConsole (prompt=0x40982210 "> ", 
    buf=0xbffff038 "for (i in 1:100) an1 <- ann(cbind(runif(1000),
runif(1000)), k = 4)\n", len=1024, addtohistory=1) at system.c:66
#7  0x8093618 in R_ReplConsole (rho=0x402dc338, savestack=0,
browselevel=0)
    at main.c:128
#8  0x8093e86 in run_Rmainloop () at main.c:454
#9  0x8093ec4 in Rf_mainloop () at main.c:468
#10 0x80e319a in main (ac=0, av=0xbffff934) at system.c:222

The first 100 calls went OK (as did 100 prior to that), but increasing the
number of points by one triggered the fault. It looks like memory
allocation on the C++ side, to which R >= 1.2.0 is more sensitive than
before. 

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand@nhh.no
and: Department of Geography and Regional Development, University of
Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._