Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 7cb5f643a6ee
Choose a base ref
...
head repository: NixOS/nix
compare: 8ebd10664efb
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 13, 2020

  1. Fix unspecified behaviour in readStorePathCAMap

    When deploying a Hydra instance with current Nix master, most builds
    would not run because of errors like this:
    
      queue monitor: error: --- Error --- hydra-queue-runner
      error: --- UsageError --- nix-daemon
      not a content address because it is not in the form '<prefix>:<rest>': /nix/store/...-somedrv
    
    The last error message is from parseContentAddress, which expects a
    colon-separated string, however what we got here is a store path.
    
    Looking at the worker protocol, the following message sent to the Nix
    daemon caused the error above:
    
      0x1E -> wopQuerySubstitutablePathInfos
      0x01 -> Number of paths
      0x16 -> Length of string
      "/nix/store/...-somedrv"
      0x00 -> Length of string
      ""
    
    Looking at writeStorePathCAMap, the store path is indeed the first field
    that's transmitted. However, readStorePathCAMap expects it to be the
    *second* field *on my machine*, since expression evaluation order is a
    classic form of unspecified behaviour[1] in C++.
    
    This has been introduced in #3689,
    specifically in commit 66a62b3.
    
    [1]: https://en.wikipedia.org/wiki/Unspecified_behavior#Order_of_evaluation_of_subexpressions
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Sep 13, 2020
    Copy the full SHA
    525b38e View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2020

  1. Merge pull request #4008 from aszlig/fix-ub-in-reading-ca-map

    Fix unspecified behaviour in readStorePathCAMap
    edolstra committed Sep 14, 2020
    Copy the full SHA
    8ebd106 View commit details
    Browse the repository at this point in the history