pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/58777: R crash in UTF-8 locale



>Number:         58777
>Category:       pkg
>Synopsis:       R crash in UTF-8 locale
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 26 14:55:00 +0000 2024
>Originator:     Gabor Csardi
>Release:        10.0
>Organization:
Posit Software, PBC
>Environment:
NetBSD vmactions.org 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Vanilla installation of 'R' crashes in UTF-8 locale:

vmactions# LANG=C.UTF-8 R -q -e 'toupper("foo")'
During startup - Warning message:
Setting LC_COLLATE failed, using "C"
> toupper("foo")

 *** caught segfault ***
address 0x298, cause 'memory not mapped'

Traceback:
 1: toupper("foo")
An irrecoverable exception occurred. R is aborting now ...
[1]   Segmentation fault (core dumped) LANG=C.UTF-8 R -q -e "toupper(\"foo\")"

Traceback:

# LANG=C.UTF-8 R -q -d gdb

...

(gdb) run
Starting program: /usr/pkg/lib/R/bin/exec/R -q
[New process 9003]
During startup - Warning message:
Setting LC_COLLATE failed, using "C"
> toupper("foo")

Thread 1 "" received signal SIGSEGV, Segmentation fault.
0x00007be20a2ae697 in towctrans () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007be20a2ae697 in towctrans () from /usr/lib/libc.so.12
#1  0x00007be20b4b8e35 in do_tolower () from /usr/pkg/lib/R/lib/libR.so
#2  0x00007be20b53d5ef in bcEval_loop () from /usr/pkg/lib/R/lib/libR.so
#3  0x00007be20b555d55 in bcEval () from /usr/pkg/lib/R/lib/libR.so
#4  0x00007be20b555fc8 in Rf_eval () from /usr/pkg/lib/R/lib/libR.so
#5  0x00007be20b5581cf in R_execClosure () from /usr/pkg/lib/R/lib/libR.so
#6  0x00007be20b558f58 in applyClosure_core () from /usr/pkg/lib/R/lib/libR.so
#7  0x00007be20b5562a0 in Rf_eval () from /usr/pkg/lib/R/lib/libR.so
#8  0x00007be20b58af87 in Rf_ReplIteration () from /usr/pkg/lib/R/lib/libR.so
#9  0x00007be20b58b317 in R_ReplConsole () from /usr/pkg/lib/R/lib/libR.so
#10 0x00007be20b58b3aa in run_Rmainloop () from /usr/pkg/lib/R/lib/libR.so
#11 0x0000000017a00d25 in main ()

This works, but ideally I would like to use an UTF-8 locale:

vmactions# LANG=C R -q -e 'toupper("foo")'
> toupper("foo")
[1] "FOO"

Other UTF-8 locales, e.g. en_US.UTF-8 or en_GB.UTF-8 crash as well.
>How-To-Repeat:
See above. Run:

pkg_add R
LANG=C.UTF-8 R -q -e 'toupper("foo")'
>Fix:
Sorry, I don't know. :(


Home | Main Index | Thread Index | Old Index