Bug 16136

Summary: adding recursive attribute to an name and printing it leads to crash
Product: R Reporter: Frank Schwidom <schwidom>
Component: Low-levelAssignee: R-core <R-core>
Status: CLOSED FIXED    
Severity: enhancement CC: btyner, tomas.kalibera
Priority: P5    
Version: R 3.0.2   
Hardware: All   
OS: AIX   

Description Frank Schwidom 2015-01-06 14:17:56 UTC
> na <- as.name( 'a')
> attr( na, 'na') <- na
> na


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

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace



adding attributes to names should be forbidden, because 
of the global effect of this operation.


if attaching attributes to names it could be only 
take effect in local environments. the printing
routine should then recognize the recursion and
print labels like "reader-macros" in common lisp.
Comment 1 Benjamin Tyner 2018-06-02 19:15:27 UTC
As of R version 3.2.2, it no longer segfaults (instead gives "Error: print buffer overflow"), so perhaps close this?
Comment 2 Tomas Kalibera 2018-06-04 08:48:44 UTC
Thanks, closing this report as attaching attributes to symbols has been disallowed in 73239 (results in a runtime error) The print buffer overflow checking has been added in 68574 (R 3.4), which already fixed the reported issue (also by giving a runtime error).