GNU bug report logs -
#37384
Daemon does not honor “useSubstitutes” on armhf
Previous Next
Reported by: Timothy Sample <samplet <at> ngyro.com>
Date: Wed, 11 Sep 2019 18:52:01 UTC
Severity: normal
Done: Timothy Sample <samplet <at> ngyro.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 37384 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Timothy Sample <samplet <at> ngyro.com> 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:
[0001-daemon-Include-config.h-in-nix-daemon.cc.patch (text/x-patch, inline)]
From 3c3eafac82e0a6e8a37363d6eb46f128e585705a Mon Sep 17 00:00:00 2001
From: Timothy Sample <samplet <at> ngyro.com>
Date: Thu, 12 Sep 2019 00:50:54 -0400
Subject: [PATCH] daemon: Include 'config.h' in 'nix-daemon.cc'.
* nix/nix-daemon/nix-daemon.cc: Include 'config.h'.
---
nix/nix-daemon/nix-daemon.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc
index ffac6cde34..1163a249d1 100644
--- a/nix/nix-daemon/nix-daemon.cc
+++ b/nix/nix-daemon/nix-daemon.cc
@@ -1,3 +1,4 @@
+#include "config.h"
#include "shared.hh"
#include "local-store.hh"
#include "util.hh"
--
2.23.0
[Message part 3 (text/plain, inline)]
Is this okay to push? It seems kind of conspicuous that it’s missing in
the first place. Is it missing for a good reason?
-- Tim
This bug report was last modified 5 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.