Displaying 4 results from an estimated 4 matches for "r_chk_memset".
2024 Oct 31
2
Error compiling 87283 on Windows 10 using Rtools4.4 6335-6327
...lows it to power through,
but it failed at the same point. Any thoughts or suggestions would be
appreciated.
This may be unrelated, but as I was monitoring the compilation, I saw
an warning which I haven't seen before in the 20 or so years I've been
building R on Windows:
In function 'R_chk_memset',
inlined from 'do_aperm' at ../main/array.c:1754:5:
../main/memory.c:3578:16: warning: 'memset' specified bound between
18446744056529682432 and 18446744073709551608 exceeds maximum object
size 9223372036854775807 [-Wstringop-overflow=]
3578 | return n ? memset(s, c, n...
2024 Oct 31
1
Error compiling 87283 on Windows 10 using Rtools4.4 6335-6327
...Thanks
Tomas
>
> Thank you again!
>
>>> This may be unrelated, but as I was monitoring the compilation, I saw
>>> an warning which I haven't seen before in the 20 or so years I've been
>>> building R on Windows:
>>>
>>> In function 'R_chk_memset',
>>> inlined from 'do_aperm' at ../main/array.c:1754:5:
>>> ../main/memory.c:3578:16: warning: 'memset' specified bound between
>>> 18446744056529682432 and 18446744073709551608 exceeds maximum object
>>> size 9223372036854775807 [-Wstr...
2025 Apr 23
1
R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP
...rico wrote:
>>> h/t Tim Taylor for pointing out my blindspot :)
>>>
>>> We have Memcpy() in API already [1], which wraps a 0-aware R_chk_memcpy() [2].
>>>
>>> We don't quite have Memset() in API, though; instead we have Memzero()
>>> [3] for R_chk_memset(s, 0, n) which is 0-aware memset() [4].
>> I don't think that using wrappers for this is the right approach. Even
>> loading an invalid pointer is undefined behavior. While it wouldn't
>> matter on typical hardware where R is used today, it could cause a crash
>> on...
2025 Apr 23
1
R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP
>From R 4.5.0 [1], all builds of R discourage use of INTEGER() [and
friends REAL(), ... and *_RO() equivalents] on length-0 SEXP [2].
Before R 4.5.0, this was the behavior under --enable-strict-barrier.
That means the following can segfault under strict builds (e.g.
-fsanitize=alignment and -O0):
SEXP x = PROTECT(Rf_allocVector(INTSXP, 0));
SEXP y = PROTECT(Rf_allocVector(INTSXP, 0));
const