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

make check segfaults when no USER variable is set #1844

Closed
felixfrank opened this issue Feb 8, 2018 · 2 comments
Closed

make check segfaults when no USER variable is set #1844

felixfrank opened this issue Feb 8, 2018 · 2 comments

Comments

@felixfrank
Copy link
Contributor

felixfrank commented Feb 8, 2018

Tried installing czmq in an archlinux docker container, using the standard:
./autogen.sh && ./configure --prefix=... && make check
However the tests always segfaulted.
After running make debug I found out the exact line, which is in:

if (streq(getenv("USER"), "vagrant"))

printenv shows no USER variable and running the make check with a user variable makes the test succeed:
env USER="xyz" make check

Maybe there's a tiny workaround for that?

@bluca
Copy link
Member

bluca commented Feb 8, 2018

I guess it should do instead something like:

if (getenv("USER") && streq(getenv("USER"), "vagrant"))

IIRC strcmp barfs if one of the pointers is NULL which is probably what you are seeing. Could you please send a PR?

@wesyoung
Copy link
Contributor

wesyoung commented Feb 8, 2018

bah- that's on me- should have thought about that a bit better (or at-least tested it) when i added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants