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

unixsocket.c code over optimized #41

Closed
bdubbs opened this issue Nov 7, 2017 · 2 comments
Closed

unixsocket.c code over optimized #41

bdubbs opened this issue Nov 7, 2017 · 2 comments

Comments

@bdubbs
Copy link

bdubbs commented Nov 7, 2017

$ gcc --version
gcc (GCC) 7.2.0

When doing a standard build, lxterminal exits immediately. I traced this down the code in unixsocket.c function init():

unlink(socket_path);
g_free(socket_path);
start_controller(&sock_addr, lxtermwin, fd);
return TRUE;

The start_controller() code is called in line and the return code is not set properly. If I pass:

CFLAGS="-O2 -fno-inline-functions-called-once -fno-inline-small-functions" ./configure

and rebuild unixsocket.c, lxterminal then starts normally. This actually looks like a compiler optimization bug to me, but I suggest you address it either as above or with some other way to return the correct value.

-- Bruce Dubbs
linuxfromscratch.org

@mtasaka
Copy link
Contributor

mtasaka commented Nov 8, 2017

This is most probably due to #40 .

@bdubbs
Copy link
Author

bdubbs commented Nov 8, 2017

Indeed.

sed -i '/lxtermwin, argc, argv/s/init/return init/' src/unixsocket.c

fixes the problem for me.

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