Files
lix/tests
Robert Hensing d038a67bd3 Fix segfault or stack overflow caused by large derivation fields
This removes a dynamic stack allocation, making the derivation
unparsing logic robust against overflows when large strings are
added to a derivation.
Overflow behavior depends on the platform and stack configuration.

For instance, x86_64-linux/glibc behaves as (somewhat) expected:

$ (ulimit -s 20000; nix-instantiate tests/lang/eval-okay-big-derivation-attr.nix)
error: stack overflow (possible infinite recursion)

$ (ulimit -s 40000; nix-instantiate tests/lang/eval-okay-big-derivation-attr.nix)
error: expression does not evaluate to a derivation (or a set or list of those)

However, on aarch64-darwin:

$ nix-instantiate big-attr.nix                                                                                                                                                                                                                                                       ~
zsh: segmentation fault  nix-instantiate big-attr.nix

This indicates a slight flaw in the single stack protection page
approach that is not encountered with normal stack frames.
2022-01-19 15:21:56 +01:00
..
2021-12-21 09:36:50 +01:00
2020-04-14 18:45:06 +02:00
2022-01-03 21:05:53 +01:00
2022-01-04 18:40:39 +01:00
2021-07-07 10:48:47 +02:00
2019-12-13 19:05:26 +01:00
2014-08-21 21:50:19 +02:00
2021-07-07 10:48:47 +02:00
2021-11-18 22:23:36 +00:00
2021-07-07 11:30:35 +02:00
2018-02-13 14:26:19 +00:00
2020-07-30 16:38:04 -05:00
2021-11-04 15:04:04 +01:00
2021-10-15 12:52:21 +02:00
2020-10-17 23:34:38 +02:00
2006-07-21 13:21:43 +00:00
2020-08-24 18:54:16 +02:00
2021-01-21 11:02:09 +01:00
2020-07-30 16:38:04 -05:00
2018-01-16 19:23:18 +01:00
2021-10-15 16:58:21 +02:00
2020-10-17 23:34:38 +02:00
2018-01-16 19:23:18 +01:00
2019-11-27 00:05:30 +01:00
2018-02-25 16:40:05 -06:00
2020-04-20 15:27:09 +02:00
2016-04-11 16:20:15 +02:00
2020-10-17 23:34:38 +02:00
2020-05-01 12:17:53 +02:00
2021-03-31 08:30:12 +02:00
2021-12-07 21:45:09 +01:00
2007-08-13 13:15:02 +00:00
2012-12-04 14:47:50 +01:00
2021-04-09 23:13:08 +02:00