This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #132849) try to disable core files when deliberatly segfaulting
authorTony Cook <tony@develop-help.com>
Sun, 11 Feb 2018 23:50:24 +0000 (10:50 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 12 Feb 2018 00:47:03 +0000 (11:47 +1100)
commit7ec112d2a5ff7c80b00801e1c94308e3709d68df
tree53fd05caf06b5ee46aa75b70f4217d752a554675
parent48151d4db91e290cc3646c7116cd1be14316a2de
(perl #132849) try to disable core files when deliberatly segfaulting

The dist/Storable/stacksize tool probes for recursion limits for
Storable, in an attempt to prevent stack overflows, and causes
segfaults when the probes exceed the available stack size.

This was leaving a core file for each failure (whether that ended
up as a single file or one for each segfault depended on the
system settings).

Try to probe for the ulimit -c option and if it doesn't cause an
error, prefix the command used to probe for recursion limits.

Ideally I could use setrlimit() for this, but we don't expose it in
core, nor in POSIX.pm, and adding it wouldn't help for the older
perls that Storable needs to build for.
dist/Storable/stacksize