Bugzilla – Full Text Bug Listing

Summary: | wrapping an infinite recursive call in suppressWarnings() crashes R | ||
---|---|---|---|

Product: | R | Reporter: | Hervé Pagès <hpages> |

Component: | Misc | Assignee: | R-core <R-core> |

Status: | CLOSED FIXED | ||

Severity: | normal | CC: | luke, maechler |

Priority: | P5 | ||

Version: | R 3.2.3 | ||

Hardware: | x86_64/x64/amd64 (64-bit) | ||

OS: | Linux |

Description
Hervé Pagès
2016-03-09 00:53:06 UTC
```
I agree that a crash is not nice..
I also don't get a crash on my (Fedora 22) Linux.
Even
invisible(replicate(1000, try( foo() ) ) )
just gives 1000 times the line
Error : evaluation nested too deeply: infinite recursion / options(expressions=)?
---
but then when I increase the 'expressions' option, "boom!" as for you :
> options(expressions=500000) # the maximum allowed
> foo()
Process R-devel exited abnormally with code 139 at Wed Mar 9 10:23:19 2016
Error: C stack usage 8285376 is too close to the limit
Error: C stack usage 8311700 is too close to the limit
Error: C stack usage 8338004 is too close to the limit
Error: C stack usage 8364308 is too close to the limit
Error: C stack usage 8390612 is too close to the limit
Error: C stack usage 8416916 is too close to the limit
Error: C stack usage 8443220 is too close to the limit
Error: C stack usage 8469524 is too close to the limit
Error: C stack usage 8495828 is too close to the limit
Error: C stack usage 8522132 is too close to the limit
Error: C stack usage 8548436 is too close to the limit
Error: C stack usage 8574740 is too close to the limit
Error: C stack usage 8601044 is too close to the limit
Error: C stack usage 8627348 is too close to the limit
Error: segfault from C stack overflow
Error: C stack usage 140723249637764 is too close to the limit
Error: C stack usage 140723249691124 is too close to the limit
Error: C stack usage 140723249744484 is too close to the limit
Error: C stack usage 140723249814644 is too close to the limit
Error: C stack usage 140723249884804 is too close to the limit
Error: C stack usage 140723249954964 is too close to the limit
Error: C stack usage 140723250025124 is too close to the limit
(that was with latest 'R-devel') ... so here I get a bit more "information".
If you increase options(expression = .) on your Mac,
do you still not get a segfault? (but what instead) ?
```
This is a known issue with the way exit handers are run on stack unwinding. It is clear what has to be done, just need to find time to do it -- should happen fairly soon though. This is resolved by r70325. The error recovery code now unwinds the stack while running pending on.exit actions. |