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

error while loading shared libraries: libcriterion.so.3: cannot enable executable stack as shared object requires: Invalid argument #2562

Closed
hlimbo opened this issue Oct 12, 2017 · 9 comments
Labels

Comments

@hlimbo
Copy link

hlimbo commented Oct 12, 2017

Hi,

I am using the Criterion, which is a C Unit Testing Framework (https://github.com/Snaipe/Criterion). After I finished installing the Criterion package, I wanted to test out if the package was installed properly by typing up the following:

 #include <criterion/criterion.h>
Test(simple,the_test)
{ 
   cr_assert(0,"Hello World");
}

The file compiles regularly as expected using:

gcc -o test simple_test.c -lcriterion

However whenever the I attempt to run the executable test it gives the following error:

./test: error while loading shared libraries: libcriterion.so.3: cannot enable executable stack as shared object requires: Invalid argument

I have already tried a possible solution found here: ##916 but has not worked for me.

@rowanG077
Copy link

Did you try clearing the executeable stack flag? execstack -c <PathToLibrary>/libcriterion.so.3

@hlimbo
Copy link
Author

hlimbo commented Oct 13, 2017

Yes I tried do that but after I recompile and try to rerun the program, the program hangs without any error or warning messages.

@rowanG077
Copy link

Then it most likely actually requires executable stack. Which won't be supported by design on WSL. To be sure that is what is happening you could try to build your project on an actual ubuntu machine where you cleared the executable flag on the library and see if it works there. See: #286

@therealkenc
Copy link
Collaborator

therealkenc commented Oct 13, 2017

Which won't be supported by design on WSL.

Yeah the entire ecosystem is busy implementing if (workaround_wsl) as we speak. Like here, posted to bezier just four days ago.

@rowanG077
Copy link

rowanG077 commented Oct 14, 2017

Well implementing workarounds aren't good and the teams implementing it are wrong. They should just not use libraries that are still using executable stack. It`s a security risk.

@hlimbo
Copy link
Author

hlimbo commented Oct 16, 2017

I've rebuilt my project on an actual Ubuntu machine and the library I'm using works as intended. Its unfortunate I can't use libraries that require the use of an executable stack.

@rowanG077
Copy link

rowanG077 commented Oct 16, 2017

You cleared the executable flag on your actual ubuntu machine and everything works? If that is the case then this is indeed a bug.

Just write to the maintainer of the iibrary. Almost no one actually required executable stack.

@hlimbo
Copy link
Author

hlimbo commented Oct 16, 2017

I did not need to clear the executable flag on the ubuntu machine. Everything works as intended when I install the library regularly.

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

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

No branches or pull requests

4 participants