NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
jemalloc SEGV problem
Hi,
I am using the jemalloc.c file for my own library i could successfully build it.
But when i run a test cases i am getting segmentation fault.
The stack trace is as below:
#0 0x4006c304 in arena_run_split () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#1 0x4006cb6c in arena_run_alloc () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#2 0x4006e8a4 in arena_malloc () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#3 0x4006ea50 in malloc () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#4 0x4007512c in __smakebuf () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#5 0x4007ab08 in __swsetup () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#6 0x400747e0 in __sfvwrite () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#7 0x400757e8 in puts () from
/home/channagoud/channagoud_work/ARM/GIT/jemalloc/sslibc/build/lib//libsonyc.so
#8 0x00008494 in main () at test.c:5
I am getting SEGV in arena_run_split ().
My test case is as below:
int main()
{
char *ptr;
ptr=malloc(10);
strcpy(ptr,"hello");
printf("%s\n",ptr);
return 0;
}
But if i allocate memory huge memory as
int main()
{
char *ptr;
ptr=malloc(1000*1024);
strcpy(ptr,"hello");
printf("%s\n",ptr);
return 0;
}
The test case works fine.
The change i have done in the source code is undef NO_TLS since my
library has TLS support.
Could anyone help me out , i am not able to understand the reason.
Thanks & Regards,
Channagoud
Home |
Main Index |
Thread Index |
Old Index