The function `set_rl_word_breaks` in src/unix/sys-std.c relies on statically allocated strings local to the function, making other C code using the readline library at risk of creating a segfault by trying to free `rl_basic_word_break_characters` or `rl_completer_word_break_characters` when changing them.
The patch attached is against today's R-dev and will likely apply to current R-2.15 branch. With the patch applied, R is building and passing `make check`.
Created attachment 1404 [details]
svn diff ran today
Created attachment 1408 [details]
C code for a shared library that illustrates the problem
Should be built with:
R CMD SHLIB R_readline_issue.c
Once built, run the following:
break_chars <- "abcdef"
Without the patch, segfault. With the patch, all fine.