Skip to content

SIGSEGV in phtread_exit after switching from gnustl_static to libc++_static #360

Closed
@andreya108

Description

@andreya108

Description

We have a project which is for a long time compiled gnustl_static in c++ code.

Jni tasks are running async in separate thread like this (simplified for readability):

new Thread(this::asyncRunnable).start()
...
void asyncRunnable() {
try { 
   callJni(); 
} catch () {
...
} finally {
...
}
// everything is ok
} // <- sigsegv here

So, everything is fine when all code is linked with gnustl_static, but when I've tried libc++_static then I got SIGSEGV when finishing java thread (actual stacktrace points to releasing threadlocal data in pthread_exit).

Can anyone please help me figuring out what is wrong with libc++?

Environment Details

  • NDK Version: r14b
  • Build sytem: ndk-build
  • Host OS: Ubuntu 16.04
  • Compiler: Clang -std=c++14
  • ABI: arm64-v8a
  • STL: libc++
  • NDK API level: 21
  • Device API level: 25

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions