From bill at insightful.com  Mon Apr 23 17:56:26 2007
From: bill at insightful.com (Bill Dunlap)
Date: Mon, 23 Apr 2007 08:56:26 -0700 (PDT)
Subject: [Rd] plot.xy() with type="s" and huge data (PR#9629)
In-Reply-To: <20070423141027.EDB5D6265E@slim.kubism.ku.dk>
References: <20070423141027.EDB5D6265E@slim.kubism.ku.dk>
Message-ID: <Pine.GSO.4.56.0704230854240.15681@durian.statsci.com>

On Mon, 23 Apr 2007 ligges at statistik.uni-dortmund.de wrote:

> The following code snippet crashes R (under Windows and Linux) for both
> R-2.4.1 and R-2.5.0 RC as of yesterday:
>
>    set.seed(1)
>    H <- rnorm(400000)
>    temp <- rnorm(400000)
>    plot(H, temp, type='s')
>    # (no, it was not my idea to do something like that!)
>
>
> I *guess* it is some overflow in plot.xy() which calls
>    .Internal(plot.xy(xy, type, pch, lty, col, bg, cex, lwd, ...))
> but I haven't investigated closely enough, submitting the bug report in
> case anybody can (and has time to) fix this before tomorrow.

It happens right after 2 calls to alloca(), which probably
ought to be changed to non-stack allocations.  (On Linux there
is a complaint about stack overflow and valgrind complains
that someone changed the stack pointer.)  type='S' also uses
alloca().

----------------------------------------------------------------------------
Bill Dunlap
Insightful Corporation
bill at insightful dot com
360-428-8146

 "All statements in this message represent the opinions of the author and do
 not necessarily reflect Insightful Corporation policy or position."



[Rd] plot.xy() with type="s" and huge data (PR#9629)
Bill Dunlap