Bug 16136 - adding recursive attribute to an name and printing it leads to crash
Summary: adding recursive attribute to an name and printing it leads to crash
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R 3.0.2
Hardware: All AIX
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-01-06 14:17 UTC by Frank Schwidom
Modified: 2018-06-04 08:48 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
Selection: 

---------------------------------------------------

Solution:

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

or:

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).