about summary refs log tree commit diff
path: root/tests/lang/eval-okay-getattrpos-undefined.nix
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-04-03T12·27+0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-04-03T12·54+0300
commitaf86132e1afa65b4b466af3ea9c7084836c91ee0 (patch)
tree981540a89d072525f59bfaea389bb8950859e267 /tests/lang/eval-okay-getattrpos-undefined.nix
parent3fbaa230a23ef47100eb1f117008a1cee85fcf5e (diff)
libexpr: Make unsafeGetAttrPos not crash on noPos
Currently e.g. `builtins.unsafeGetAttrPos "abort" builtins` will
eventually segfault because pos->file is an unset Symbol.

Found by afl-fuzz.
Diffstat (limited to 'tests/lang/eval-okay-getattrpos-undefined.nix')
-rw-r--r--tests/lang/eval-okay-getattrpos-undefined.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-getattrpos-undefined.nix b/tests/lang/eval-okay-getattrpos-undefined.nix
new file mode 100644
index 000000000000..14dd38f7734c
--- /dev/null
+++ b/tests/lang/eval-okay-getattrpos-undefined.nix
@@ -0,0 +1 @@
+builtins.unsafeGetAttrPos "abort" builtins