Re: R-alpha: linux bug

Peter Dalgaard BSA (
11 Nov 1996 19:46:53 +0100

To: Thomas Lumley <>
Subject: Re: R-alpha: linux bug
From: Peter Dalgaard BSA <>
Date: 11 Nov 1996 19:46:53 +0100
In-Reply-To: Thomas Lumley's message of Mon, 11 Nov 1996 10:15:44 -0800 (PST)
Message-Id: <>

Thomas Lumley <> writes:

> When I call certain dynamically loaded C routines from R 0.13 under linux
> I get a floating point exception.  The exception happens before the first
> line of the C routine, and in or after the line of code in dotcode.c that
> calls the C routine ie
> 	fun(cargs[0],cargs[1],...)
> It does not happen with all routines in a given library. It does not
> always happen (only 90-95% of the time). It doesn't matter whether this
> routine is the first foreign routine callled. Changing the name of the
> C function doesn't help.  The identical dynamic load library and R code
> works under R0.12.  The same C and R code works when compiled and run
> under SunOS 4.1 with the same version of gcc. 
> I am using Linux kernel 1.2.13 and gcc 2.7.1.  One example of the problem is 
> the "coxfit2" routine called by in the survival4 library. The 
> error occurs with both the version of the C code in my original port and 
> with a slightly altered newer version. For comparison, the "agexact" and 
> "coxmart" routines also called by work properly.
> Any ideas?

Does it go away if you don't optimize (either dotcode.c or the
dyn.loadable routine)? It's pretty weird, because floating point
doesn't seem to be used anywhere near the indicated point. 

It could be a compiler error. Your gcc is a tad old, mine is 2.7.2 and
I believe is out.

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (             FAX: (+45) 35327907
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: