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

Package request: cppcheck #2951

Closed
easyaspi314 opened this issue Oct 11, 2018 · 7 comments
Closed

Package request: cppcheck #2951

easyaspi314 opened this issue Oct 11, 2018 · 7 comments
Labels
package request A new package was requested.

Comments

@easyaspi314
Copy link
Contributor

easyaspi314 commented Oct 11, 2018

I have already tried building cppcheck on my LG G3. It successfully compiles, but when tested, there are crashes in __cxa_end_cleanup.

It seems to occur whenever an exception is caught, as removing the throws prevents the crash, but causes tests to fail.

Notable crashes are ErrorLogger::ErrorMessage::deserialize and TestGarbage::wrong_syntax1 (the crash is in TestGarbage::checkCode).

GDB shows that the program crashes because __cxa_end_cleanup calls itself recursively, then the program aborts because of the stack overflow. It is really difficult to debug, as I am not very good with GDB.

I have compiled both HEAD and the latest release with both clang++-7 and g++-8 (from its-pointless).

LG G3 (LG D851)
Qualcomm Snapdragon 801 (ARMv7a)
LineageOS 15.1

System information:
    Linux localhost 3.4.113-LineageXTD-R7 #1 SMP PREEMPT Fri Jun 15 20:42:06 CEST 2018 armv7l Android
Termux-packages arch:
    arm
Android version:
    8.1.0
Device manufacturer:
    LGE
Device model:
    LG-D851
@easyaspi314
Copy link
Contributor Author

easyaspi314 commented Oct 11, 2018

Potentially related to android/ndk#289, but I tried the workarounds to no prevail, and the NDK version is supposedly already patched.

I wonder if this might alternatively be a system library issue, which is one of the reasons I suggested providing the system C/C++ libraries ourselves in #2874.

@its-pointless
Copy link
Contributor

Could you provide example code that causes error?

@its-pointless
Copy link
Contributor

Oh you mean tests from cppcheck

@easyaspi314
Copy link
Contributor Author

easyaspi314 commented Oct 12, 2018

Yes, when you run make test, it will compile a huge binary (most of which is debugging symbols), run it, go through most of the tests fine, but those tests mentioned above either segfault or abort.

It also occasionally happens when running cppcheck itself, so it isn't just a problem with the testsuite.

Side note: Keep your sanity, and before you build, go to line 83 of the Makefile and remove the -Wabi flag from CXXFLAGS.

@its-pointless
Copy link
Contributor

it works fine in aarch64 but segfaults in arm.

@easyaspi314
Copy link
Contributor Author

Yeah, I have been noticing weird stuff like that. I was trying to test a custom version of binutils, and it works on x86, x86_64, and ARMv7, but not Aarch64. 🤔

Is this NDK release just really broken?

@fornwall fornwall added the package request A new package was requested. label Nov 17, 2018
@ghost
Copy link

ghost commented Jan 2, 2020

Package is available in unstable-packages repository.

pkg install unstable-repo
pkg install cppcheck

@ghost ghost closed this as completed Jan 2, 2020
@termux termux locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package request A new package was requested.
Projects
None yet
Development

No branches or pull requests

3 participants