[Rd] cbind() crashes on raw vectors

Hervé Pagès hpages at fhcrc.org
Fri Sep 23 22:46:55 CEST 2011


Hi,

cbind() doesn't seem to like raw vectors:

 > df <- cbind(a=integer(4000), b=raw(4000))
 > df
*** glibc detected *** /home/hpages/R-2.13.1/bin/exec/R: malloc(): 
memory corruption: 0x0000000002d73ca0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x79d7a)[0x7f3592b91d7a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7f3592b9431e]
/lib/libreadline.so.5(xmalloc+0x6)[0x7f3592620ab6]
/lib/libreadline.so.5(add_history+0xbe)[0x7f359262136e]
/home/hpages/R-2.13.1/lib/libR.so(+0x1b6538)[0x7f35936bd538]
/lib/libreadline.so.5(rl_callback_read_char+0x8c)[0x7f359261cb1c]
/home/hpages/R-2.13.1/lib/libR.so(+0x1b6f74)[0x7f35936bdf74]
/home/hpages/R-2.13.1/lib/libR.so(Rf_ReplIteration+0xe7)[0x7f3593610eb7]
/home/hpages/R-2.13.1/lib/libR.so(+0x10a260)[0x7f3593611260]
/home/hpages/R-2.13.1/lib/libR.so(run_Rmainloop+0x50)[0x7f3593611780]
/home/hpages/R-2.13.1/bin/exec/R(main+0x1b)[0x40085b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7f3592b36eff]
/home/hpages/R-2.13.1/bin/exec/R[0x400779]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:01 3811201 
  /home/hpages/R-2.13.1/bin/exec/R
00600000-00601000 r--p 00000000 08:01 3811201 
  /home/hpages/R-2.13.1/bin/exec/R
00601000-00602000 rw-p 00001000 08:01 3811201 
  /home/hpages/R-2.13.1/bin/exec/R
02583000-03b16000 rw-p 00000000 00:00 0 
  [heap]
7f358c000000-7f358c021000 rw-p 00000000 00:00 0
7f358c021000-7f3590000000 ---p 00000000 00:00 0
7f3590342000-7f3590357000 r-xp 00000000 08:06 8155 
  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590357000-7f3590556000 ---p 00015000 08:06 8155 
  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590556000-7f3590557000 r--p 00014000 08:06 8155 
  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590557000-7f3590558000 rw-p 00015000 08:06 8155 
  /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3590558000-7f35905c4000 r-xp 00000000 08:01 3818237 
  /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35905c4000-7f35907c3000 ---p 0006c000 08:01 3818237 
  /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c3000-7f35907c5000 r--p 0006b000 08:01 3818237 
  /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c5000-7f35907c7000 rw-p 0006d000 08:01 3818237 
  /home/hpages/R-2.13.1/library/stats/libs/stats.so
7f35907c7000-7f359083a000 rw-p 00000000 00:00 0
7f359083a000-7f359085c000 r-xp 00000000 08:01 3817784 
  /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f359085c000-7f3590a5b000 ---p 00022000 08:01 3817784 
  /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f3590a5b000-7f3590a5c000 r--p 00021000 08:01 3817784 
  /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f3590a5c000-7f3590a5d000 rw-p 00022000 08:01 3817784 
  /home/hpages/R-2.13.1/library/grDevices/libs/grDevices.so
7f3590b61000-7f3590b63000 r-xp 00000000 08:07 671027 
  /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590b63000-7f3590d62000 ---p 00002000 08:07 671027 
  /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590d62000-7f3590d63000 r--p 00001000 08:07 671027 
  /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590d63000-7f3590d64000 rw-p 00002000 08:07 671027 
  /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
7f3590d64000-7f3590de6000 rw-p 00000000 00:00 0
7f3590de6000-7f3590ded000 r-xp 00000000 08:01 3818288 
  /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590ded000-7f3590fec000 ---p 00007000 08:01 3818288 
  /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590fec000-7f3590fed000 r--p 00006000 08:01 3818288 
  /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590fed000-7f3590fee000 rw-p 00007000 08:01 3818288 
  /home/hpages/R-2.13.1/library/methods/libs/methods.so
7f3590fee000-7f3590ffa000 r-xp 00000000 08:06 8319 
  /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f3590ffa000-7f35911f9000 ---p 0000c000 08:06 8319 
  /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f35911f9000-7f35911fa000 r--p 0000b000 08:06 8319 
  /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f35911fa000-7f35911fb000 rw-p 0000c000 08:06 8319 
  /lib/x86_64-linux-gnu/libnss_files-2.13.so
7f35911fb000-7f3591206000 r-xp 00000000 08:06 8321 
  /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591206000-7f3591405000 ---p 0000b000 08:06 8321 
  /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591405000-7f3591406000 r--p 0000a000 08:06 8321 
  /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591406000-7f3591407000 rw-p 0000b000 08:06 8321 
  /lib/x86_64-linux-gnu/libnss_nis-2.13.so
7f3591407000-7f359141e000 r-xp 00000000 08:06 8316 
  /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359141e000-7f359161d000 ---p 00017000 08:06 8316 
  /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359161d000-7f359161e000 r--p 00016000 08:06 8316 
  /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359161e000-7f359161f000 rw-p 00017000 08:06 8316 
  /lib/x86_64-linux-gnu/libnsl-2.13.so
7f359161f000-7f3591621000 rw-p 00000000 00:00 0
7f3591621000-7f3591629000 r-xp 00000000 08:06 8317 
  /lib/x86_64-linux-gnu/libnss_compat-2.13.so
7f3591629000-7f3591828000 ---p 00008000 08:06 8317 
  /lib/x86_64-linux-gnu/libnss_compat-2.13.so
7f3591828000-7f3591829000 r--p 00007000 08:06 8317 
  /lib/x86_64-linux-gnu/libnss_compat-2.13.so
7f3591829000-7f359182a000 rw-p 00008000 08:06 8317 
  /lib/x86_64-linux-gnu/libnss_compat-2.13.so
7f359182a000-7f3591d21000 r--p 00000000 08:07 590549 
  /usr/lib/locale/locale-archive
7f3591d21000-7f3591d61000 r-xp 00000000 08:06 8139 
  /lib/libncurses.so.5.7
7f3591d61000-7f3591f60000 ---p 00040000 08:06 8139 
  /lib/libncurses.so.5.7
7f3591f60000-7f3591f64000 r--p 0003f000 08:06 8139 
  /lib/libncurses.so.5.7
7f3591f64000-7f3591f65000 rw-p 00043000 08:06 8139 
  /lib/libncurses.so.5.7
7f3591f65000-7f3591f6c000 r-xp 00000000 08:06 8326 
  /lib/x86_64-linux-gnu/librt-2.13.so
7f3591f6c000-7f359216b000 ---p 00007000 08:06 8326 
  /lib/x86_64-linux-gnu/librt-2.13.so
7f359216b000-7f359216c000 r--p 00006000 08:06 8326 
  /lib/x86_64-linux-gnu/librt-2.13.soAborted

This is with R 2.13.1 but it also crashes recent R devel.

Thanks,
H.

 > sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
  [5] LC_MONETARY=C              LC_MESSAGES=en_CA.UTF-8
  [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the R-devel mailing list