Re: [Rd] Crash - cause 'memory not mapped'

From: Thomas Lumley <tlumley_at_uw.edu>
Date: Mon, 12 Nov 2012 15:16:31 +1300

On Sat, Nov 10, 2012 at 12:33 PM, Peter Langfelder < peter.langfelder_at_gmail.com> wrote:

> On Fri, Nov 9, 2012 at 3:05 PM, gianluca mastrantonio
> <gianluca.mastrantonio_at_yahoo.it> wrote:
> > the error "memory non mapped" happen also if i use
> > void FiltroGaus(SEXP size1_r, SEXP size2_r, SEXP sigma_r)
> > instead
> > SEXP FiltroGaus(SEXP size1_r, SEXP size2_r, SEXP sigma_r) {
> >
>
> If you use a .Call on a function, the function must return a SEXP, it
> cannot be have a void return value.
>
>

And if one uses a reasonable warning level on the compiler, there should be a warning, such as gcc's "control reaches end of a non-void function"

Also .C() doesn't pass SEXPs, so the declaration of the function is still wrong for .C(), though this one the compiler won't notice.

    --thomas

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland

	[[alternative HTML version deleted]]

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 12 Nov 2012 - 02:21:21 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 14 Nov 2012 - 15:10:51 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive