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

Conditional jump or move depends on uninitialised value(s) in Socket_connect #57

Open
S-trace opened this issue Oct 31, 2019 · 2 comments · May be fixed by #60
Open

Conditional jump or move depends on uninitialised value(s) in Socket_connect #57

S-trace opened this issue Oct 31, 2019 · 2 comments · May be fixed by #60

Comments

@S-trace
Copy link

S-trace commented Oct 31, 2019

Hello.

Valgrind says:

==9657== Conditional jump or move depends on uninitialised value(s)
==9657==    at 0x12959D: Socket_connect (socket_linux.c:319)
==9657==    by 0x127F72: handleConnection (cs104_connection.c:733)
==9657==    by 0x488E181: start_thread (pthread_create.c:486)
==9657==    by 0x49C3B1E: clone (clone.S:95)
==9657==  Uninitialised value was created by a stack allocation
==9657==    at 0x12937F: Socket_connect (socket_linux.c:280)

Looks like it's happens after timed out connection attempt.

Thank you.

@mzillgith
Copy link
Contributor

Hello, I cannot reproduce the problem. Can you provide more information how to reproduce? What version of Linux/libc are you using?

@S-trace
Copy link
Author

S-trace commented Nov 15, 2019

I'm too could reproduce this problem only sometimes.

I'd used Kubuntu 19.04 AMD64 and libc was libc-bin:amd64 2.29-0ubuntu2 at the time I'd reported this issue.

This bug was detected in https://github.com/glial-iot/tarantool_iec_104_rock (in glial-iot/tarantool_iec_104_rock@db7814a commit, as i can remember) using standalone binary (libtest cmake target).

S-trace added a commit to S-trace/lib60870 that referenced this issue Nov 18, 2019
…z-automation#57)

getsockopt() may return -1, set ERRNO = EINPROGRESS (115: Operation now in progress)
and not initialze so_error on Kubuntu 19.10 AMD64 with kernel 5.3.0-23-generic

So, initialize the value to -1, and add check for getsockopt() result
(and add log message if DEBUG_SOCKET is set).

Fixes mz-automation#57
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

Successfully merging a pull request may close this issue.

2 participants