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

qnx core dump #2383

Open
tangzhiqiang3 opened this issue Sep 15, 2023 · 1 comment
Open

qnx core dump #2383

tangzhiqiang3 opened this issue Sep 15, 2023 · 1 comment

Comments

@tangzhiqiang3
Copy link

          demo program:

`#include <stdio.h>
#include <gperftools/tcmalloc.h>

int main()
{
char *ptr = (char *)tc_malloc(sizeof(char));
if(ptr){
printf("tcmalloc works failed!\n");
}
tc_free(ptr);

printf("tcmalloc works fine.\n");

return 0;

}`

Execution issues after cross compilation:
ldd test
./test:
libtcmalloc.so.9 => /var/data/demo_test/libtcmalloc.so.9 (0x268c1ce000)
libc++.so.1 => /lib64/libc++.so.1 (0x268c3d1000)
libm.so.3 => /lib64/libm.so.3 (0x268c4c0000)
libc.so.4 => /usr/lib/ldqnx-64.so.2 (0x268c11b000)
./test

Process 905670781 (test) terminated SIGSEGV code=1 fltno=11 ip=0000000defa9a868(/var/data/demo_test/libtcmalloc.so.9@calloc+0x0000000000000000) mapaddr=000000000002e868. ref=000000368d29cfc0
Memory fault (core dumped)

debug:
(gdb) set solib-search-path ./lib
(gdb) file test
Reading symbols from test...done.
(gdb) core-file test.core
[New pid 39800955 tid 1]
Program terminated with signal SIGSEGV, Segmentation fault.
#0 tc_calloc (n=n@entry=34, elem_size=elem_size@entry=8) at src/tcmalloc.cc:1984
1984 size_t elem_size) PERFTOOLS_NOTHROW {
(gdb) f 1
#1 0x00000033358c4e04 in __emutls_get_address (obj=0x33358e4040 <__emutls_v._ZN8tcmalloc11ThreadCache17threadlocal_data_E>) at ../../../../libgcc/emutls.c:159
159 ../../../../libgcc/emutls.c: No such file or directory.
(gdb) f 1
#1 0x00000033358c4e04 in __emutls_get_address (obj=0x33358e4040 <__emutls_v._ZN8tcmalloc11ThreadCache17threadlocal_data_E>) at ../../../../libgcc/emutls.c:159
159 in ../../../../libgcc/emutls.c
(gdb) p list
No symbol "list" in current context.
(gdb) p next
$1 = 1
(gdb) p list
No symbol "list" in current context.
(gdb)

why ?

Originally posted by @tangzhiqiang3 in #1979 (comment)

@wwbmmm
Copy link
Contributor

wwbmmm commented Sep 19, 2023

What does this problem have to do with brpc?

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

2 participants