Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2018-06-12 | Add temporary stats | Eelco Dolstra | 2 | -1/+28 | |
2018-06-12 | Cache parse trees | Eelco Dolstra | 2 | -2/+19 | |
This prevents EvalState::resetFileCache() from parsing everything all over again. | |||||
2018-06-12 | Remove duplicate definition of allocBytes() | Eelco Dolstra | 3 | -29/+15 | |
2018-05-30 | Fix static assertion failure on 32-bit systems | Eelco Dolstra | 1 | -1/+1 | |
2018-05-30 | Move evaluator-specific settings out of libstore | Eelco Dolstra | 5 | -14/+41 | |
2018-05-28 | Merge pull request #2187 from bgamari/stoi-exceptions | Eelco Dolstra | 1 | -1/+1 | |
json-to-value: Use strtol instead of strtoi | |||||
2018-05-26 | json-to-value: Use strtol instead of strtoi | Ben Gamari | 1 | -1/+1 | |
NixInt is long, so strtoi is too restrictive. | |||||
2018-05-26 | eval.cc: add message to static_assert, message can be omitted w/c++17 | Will Dietz | 1 | -1/+1 | |
2018-05-24 | Merge pull request #2157 from volth/bitwise | Eelco Dolstra | 1 | -0/+17 | |
add builtins: __bitAnd, __bitOr, __bitXor | |||||
2018-05-22 | Make Env self-describing | Eelco Dolstra | 2 | -8/+12 | |
If the Env denotes a 'with', then values[0] may be an Expr* cast to a Value*. For code that generically traverses Values/Envs, it's useful to know this. | |||||
2018-05-22 | Memoise checkSourcePath() | Eelco Dolstra | 2 | -1/+11 | |
This prevents hydra-eval-jobs from statting the same files over and over again. | |||||
2018-05-16 | add `mod' and bitwise builtins: camel-case function names | volth | 1 | -6/+6 | |
2018-05-16 | add `mod' and bitwise builtins: remove `mod' and shifts | volth | 1 | -36/+0 | |
2018-05-16 | add `mod' and bitwise builtins: remove infix functions | volth | 1 | -7/+0 | |
2018-05-12 | add `mod' and bitwise builtins | volth | 2 | -0/+60 | |
2018-05-11 | Don't return negative numbers from the flex tokenizer | Eelco Dolstra | 1 | -1/+5 | |
Fixes #1374. Closes #2129. | |||||
2018-05-11 | Revert "Throw a specific error for incomplete parse errors." | Eelco Dolstra | 3 | -11/+1 | |
This reverts commit 6498adb002bcf7e715afe46c23b8635d4592c156. We don't actually use IncompleteParseError in 'nix repl'. | |||||
2018-05-09 | In restricted eval mode, allow access to the closure of store paths | Eelco Dolstra | 1 | -1/+11 | |
E.g. this makes nix eval --restrict-eval -I /nix/store/foo '(builtins.readFile "/nix/store/foo/symlink/bla")' (where /nix/store/foo/symlink is a symlink to another path in the closure of /nix/store/foo) succeed. This fixes a regression in Hydra compared to Nix 1.x (where there were no restrictions at all on access to the Nix store). | |||||
2018-05-02 | Fix some random -Wconversion warnings | Eelco Dolstra | 7 | -57/+60 | |
2018-04-23 | Merge branch 'pos-crash-fix' of git://github.com/dezgeg/nix | Shea Levy | 1 | -1/+1 | |
2018-04-17 | isFunction: True on primops. | Shea Levy | 1 | -1/+12 | |
Fixes #2073 | |||||
2018-04-09 | Export required C++ version in pkgconfig. | Shea Levy | 1 | -1/+1 | |
2018-04-09 | Make prim_exec and prim_importNative available to plugins | Shea Levy | 2 | -2/+10 | |
2018-04-03 | libexpr: Make unsafeGetAttrPos not crash on noPos | Tuomas Tynkkynen | 1 | -1/+1 | |
Currently e.g. `builtins.unsafeGetAttrPos "abort" builtins` will eventually segfault because pos->file is an unset Symbol. Found by afl-fuzz. | |||||
2018-03-19 | Shut up signedness warning | Eelco Dolstra | 2 | -2/+2 | |
2018-03-16 | Merge pull request #1939 from dezgeg/lexer-fix | Eelco Dolstra | 1 | -4/+5 | |
libexpr: Recognize newline in more places in lexer | |||||
2018-03-14 | Catch more possible instances of passing NULL to memcpy. | Shea Levy | 1 | -4/+8 | |
Actually fixes #1976. | |||||
2018-03-14 | concatLists: Don't pass NULL pointers to memcpy. | Shea Levy | 1 | -1/+2 | |
This is UB, even if the size is 0. See #1976. Fixes #1976. | |||||
2018-03-14 | Fix compatibility with latest boost::format | Eelco Dolstra | 2 | -23/+23 | |
2018-03-13 | fetchGit: Fix debug message | Guillaume Maudoux | 1 | -1/+1 | |
2018-03-09 | Modified MakeBinOp to no longer produce its name using concatenation and "##". | Tim Engler | 1 | -11/+11 | |
Doing so prevents emacs tags from working, as well as makes the code extremely confusing for a newbie. In the prior state, if someone wants to find the definition of "ExprApp" for example, a grep through the code reveals nothing. Since the definition could be hiding in numerous ".h" files, it's really difficult to find. This personally took me several hours to figure out. | |||||
2018-03-02 | libexpr: Recognize newline in more places in lexer | Tuomas Tynkkynen | 1 | -4/+5 | |
Flex's regexes have an annoying feature: the dot matches everything except a newline. This causes problems for expressions like: "${0}\ " where the backslash-newline combination matches this rule instead of the intended one mentioned in the comment: <STRING>\$|\\|\$\\ { /* This can only occur when we reach EOF, otherwise the above (...|\$[^\{\"\\]|\\.|\$\\.)+ would have triggered. This is technically invalid, but we leave the problem to the parser who fails with exact location. */ return STR; } However, the parser actually accepts the resulting token sequence ('"' DOLLAR_CURLY 0 '}' STR '"'), which is a problem because the lexer rule didn't assign anything to yylval. Ultimately this leads to a crash when dereferencing a NULL pointer in ExprConcatStrings::bindVars(). The fix does change the syntax of the language in some corner cases but I think it's only turning previously invalid (or crashing) syntax to valid syntax. E.g. "a\ b" and ''a''\ b'' were previously syntax errors but now both result in "a\nb". Found by afl-fuzz. | |||||
2018-02-28 | fetchGit: use "HEAD" as default ref | Will Dietz | 1 | -1/+1 | |
2018-02-28 | Actually fix nixDataDir in non-canonical path | Shea Levy | 2 | -2/+2 | |
2018-02-26 | libexpr: Fix prim_replaceStrings() to work on an empty source string | Tuomas Tynkkynen | 1 | -3/+14 | |
Otherwise, running e.g. nix-instantiate --eval -E --strict 'builtins.replaceStrings [""] ["X"] "abc"' would just hang in an infinite loop. Found by afl-fuzz. First attempt of this was reverted in e2d71bd1862cdda because it caused another infinite loop, which is fixed now and a test added. | |||||
2018-02-22 | Merge branch 'data-dir-non-canon' of https://github.com/shlevy/nix | Eelco Dolstra | 1 | -1/+1 | |
2018-02-22 | Fix restricted mode when installing in non-canonical data dir | Shea Levy | 1 | -1/+1 | |
2018-02-21 | Revert "libexpr: Fix prim_replaceStrings() to work on an empty source string" | Eelco Dolstra | 1 | -8/+3 | |
This reverts commit 4ea9707591beceacf9988b3c185faf50da238403. It causes an infinite loop in Nixpkgs evaluation, e.g. "nix-instantiate -A hello" hung. PR #1886. | |||||
2018-02-19 | libexpr: Fix prim_replaceStrings() to work on an empty source string | Tuomas Tynkkynen | 1 | -3/+8 | |
Otherwise, running e.g. nix-instantiate --eval -E --strict 'builtins.replaceStrings [""] ["X"] "abc"' would just hang in an infinite loop. Found by afl-fuzz. | |||||
2018-02-19 | libexpr: Don't create lots of temporary strings in Bindings::lexicographicOrder | Tuomas Tynkkynen | 1 | -1/+1 | |
Avoids ~180,000 string temporaries created when evaluating a headless NixOS system. | |||||
2018-02-17 | libexpr: Avoid an unnecessary string copy in prim_derivationStrict | Tuomas Tynkkynen | 1 | -1/+1 | |
2018-02-17 | libexpr: Remove unnecessary drvName assignment in prim_derivationStrict | Tuomas Tynkkynen | 1 | -6/+0 | |
drvName is already assigned to the same value right at the start of the function. | |||||
2018-02-17 | libexpr: Optimize prim_derivationStrict by using more symbol comparisons | Tuomas Tynkkynen | 3 | -10/+15 | |
2018-02-17 | libexpr: Rely on Boehm returning zeroed memory in EvalState::allocEnv() | Tuomas Tynkkynen | 2 | -5/+5 | |
Boehm guarantees that memory returned by GC_malloc() is zeroed, so take advantage of that. | |||||
2018-02-17 | libexpr: Optimize prim_attrNames a bit | Tuomas Tynkkynen | 1 | -2/+5 | |
Instead of having lexicographicOrder() create a temporary sorted array of Attr*:s and copying attr names from that, copy the attr names first and then sort that. | |||||
2018-02-16 | libexpr: Pre-reserve space in string in unescapeStr() | Tuomas Tynkkynen | 1 | -3/+4 | |
Avoids some malloc() traffic. | |||||
2018-02-14 | Add splitVersion primop. | Shea Levy | 3 | -1/+24 | |
Fixes #1868. | |||||
2018-02-13 | Merge branch 'register-constant' of https://github.com/shlevy/nix | Eelco Dolstra | 3 | -2/+11 | |
2018-02-11 | Nix stats: flatten statistics | Frederik Rietdijk | 1 | -3/+6 | |
Flattens the list of statistics as suggested in https://github.com/NixOS/ofborg/issues/67. This makes it easier to work with. | |||||
2018-02-08 | Allow using RegisterPrimop to define constants. | Shea Levy | 3 | -2/+11 | |
This enables plugins to add new constants, as well as new primops. |