Hello,
I've submitted a new version of my package 'gfilmm' and the CRAN checks on Solaris (only Solaris) detect a caught segfault ("memory not mapped"). This package uses 'Rcpp'.
I've run some code with Valgrind but I don't know what to conclude from the output:
==25756== Invalid read of size 16
==25756== at 0x5591758: __wcsnlen_sse4_1 (strlen.S:117)
==25756== by 0x557ECA1: wcsrtombs (wcsrtombs.c:104)
==25756== by 0x5504C40: wcstombs (wcstombs.c:34)
==25756== by 0x4EF2F62: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6BED0: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6F821: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== Address 0x228bf5e0 is 8 bytes after a block of size 8 alloc'd
==25756== at 0x4C33B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25756== by 0x4FAD8A0: R_chk_calloc (in /usr/lib/R/lib/libR.so)
==25756== by 0x4EF2EF3: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6BED0: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6F821: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78E49: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756==
==25756== Invalid read of size 16
==25756== at 0x559175D: __wcsnlen_sse4_1 (strlen.S:117)
==25756== by 0x557ECA1: wcsrtombs (wcsrtombs.c:104)
==25756== by 0x5504C40: wcstombs (wcstombs.c:34)
==25756== by 0x4EF2F62: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6BED0: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6F821: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== Address 0x228bf5f0 is 16 bytes after a block of size 16 in arena "client"
==25756==
==25756== Invalid read of size 16
==25756== at 0x5591762: __wcsnlen_sse4_1 (strlen.S:117)
==25756== by 0x557ECA1: wcsrtombs (wcsrtombs.c:104)
==25756== by 0x5504C40: wcstombs (wcstombs.c:34)
==25756== by 0x4EF2F62: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6BED0: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6F821: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== Address 0x228bf600 is 32 bytes before an unallocated block of size 29,248 in arena "client"
==25756==
==25756== Conditional jump or move depends on uninitialised value(s)
==25756== at 0x5591831: __wcsnlen_sse4_1 (strlen.S:161)
==25756== by 0x557ECA1: wcsrtombs (wcsrtombs.c:104)
==25756== by 0x5504C40: wcstombs (wcstombs.c:34)
==25756== by 0x4EF2F62: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6BED0: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F6F821: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F78C7F: Rf_eval (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7AADE: ??? (in /usr/lib/R/lib/libR.so)
==25756== by 0x4F7B822: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==25756==
What could be the reason of "Invalid read of size 16"? Do you have any clue?
Also, would you have any clue about why this error occurs on Solaris only?
The C++ code is available on Github but it is >1000 lines and a bit complex.