Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite failure: Your dummy space has been corrupted. Size is: "" #1

Closed
peti opened this issue Mar 17, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@peti
Copy link

commented Mar 17, 2015

A complete build log is at http://hydra.cryp.to/build/626545/log/raw.

@mgsloan

This comment has been minimized.

Copy link
Collaborator

commented Mar 18, 2015

Thanks for the report! This is a mystery to me - I can't reproduce the problem locally. I'm using an identical set of dependencies.

Here's where the dummy string is generated: https://github.com/fpco/executable-hash/blob/master/System/Executable/Hash/Internal.hs#L20

And here's where the exception is coming from: https://github.com/snoyberg/file-embed/blob/master/Data/FileEmbed.hs#L238

Is feexecutable-hash a substring of the binary? While I'm not sure if it would be helpful, maybe you could upload the dist/test-inject/test-inject binary?

Perhaps it's something nix related? I know that nix tries very hard to make builds deterministic, but I can't see that breaking this..

@peti

This comment has been minimized.

Copy link
Author

commented Mar 19, 2015

The binaries are available in https://gist.github.com/peti/ae4fdd4e75171cd449a1. I hope this helps.

@mgsloan

This comment has been minimized.

Copy link
Collaborator

commented Mar 19, 2015

Ah, that is helpful, thanks! Your binaries are tiny compared to mine, likely because they are dynamically linked. Since the dummy string is in the library, it isn't found within the executable's binary.

The API should probably be changed to make this a nonissue. This would involve the following changes:

  • Make executableHash and injectedExecutableHash into TH functions, which yield Q Exp.
  • Have file-embed replace multiple instances of the dummy string. This way multiple usages of executable-hash will still work. This is one of the reasons I didn't do this in the first place.

The alternative would be to demand statically linked binaries, but since that's avoidable, this seems like a good thing to change.

@mgsloan

This comment has been minimized.

Copy link
Collaborator

commented Mar 19, 2015

I think I prefer this anyway, because it'll make it clearer that the executableHash function is doing something magical.

@mgsloan

This comment has been minimized.

Copy link
Collaborator

commented Mar 20, 2015

@peti I've uploaded executable-hash-0.2.0.0 to hackage. Can you please verify that this resolves the issue?

@peti

This comment has been minimized.

Copy link
Author

commented May 13, 2015

I'm a little late with my response. I'm sorry about that. New versions of the package work fine in NIxOS: http://hydra.nixos.org/job/nixpkgs/haskell-updates/haskellngPackages.executable-hash.x86_64-linux.

@peti peti closed this May 13, 2015

@mgsloan

This comment has been minimized.

Copy link
Collaborator

commented May 14, 2015

No worries, thanks for verifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.