[Rd] embedded R regexec returning nonsense

Warnes, Gregory R gregory_r_warnes@groton.pfizer.com
Wed, 8 May 2002 02:18:22 -0400


Under RSPython and rpy, the regexec C function is returning nonsensical
results leading to segmentation faults.  This is happening in some
situations under R 1.4.1 and (more often?) under R 1.5.0  on my Solaris 8
box.  R 1.4.1 was compiled with gcc 2.95.2, and I've tried 1.5.0 with both
gcc 2.95.2 and gcc 3.0.3.   The error appears to be exactly the same under
both python tools and both compilers.  This makes me suspect that there is
some hairy interaction between the R regex functions and something in
python.

With R 1.4.1, R starts up smoothly under rpy and RSPython and only certain
functions elicit the error.  For instance, doing "bitmap('file.bmp')" will
cause a segfault in do_strsplit (character.c:260) because the regmatch
structure contains the nonsense values:

	(gdb) print regmatch[0]
	$1 = {rm_so = 9257728, rm_eo = 9257729}


With R 1.5.0, R fails to complete startup initialization under both rpy and
RSPython, segfaulting in do_readDCF (dcf.c:109) with similar nonsense values
in the regmatch structure:

	(gdb) print regmatch
	$7 = {{rm_so = 9777896, rm_eo = 9777905}}


Does anyone have asuggestion on the best way to track down the cause of this
problem?   I'll be happy to provide tracebacks, core dumps, etc if that
would help.

Thanks,

Greg







LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._