Timothy Sample writes: > The problem goes away if I move “useSubstitutes” above “reservedSize”, > which has type “off_t”. I’m guessing this is because of something fishy > with “_FILE_OFFSET_BITS”, but I’m not sure what just yet. Here’s my best guess as to what is going on. In “nix-daemon.cc” the order of includes causes “off_t” to be defined before “_FILE_OFFSET_BITS”, which results in it being something like a 32-bit signed integer. In “local-store.cc”, “_FILE_OFFSET_BITS” gets set first, yielding a 64-bit “off_t”. This causes all of the addresses in the “Settings” struct to be mismatched after “reservedSize”. I plugged in “sizeof(off_t)” into the “printMsg” calls from before, and (lo and behold) I saw 4 from “nix-daemon.cc” and 8 from “local-store.cc”. The following patch fixes the problem: