malloc always fail with SIGSEGV at __get_nprocs getsysstats.c:151
Please someone help!
I run my apps on Ubuntu 16.04.2 LTS, every time it will crash with Segmentation fault
the place is just a malloc call like
pMalloc = malloc(size); // size value is 40
really don't know why crash every time.
I check the backtrace from core file generated, get below info
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
Core was generated by `myApp'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fdf8f2e4de2 in __get_nprocs () at ../sysdeps/
151 ../sysdeps/
[Current thread is 1 (Thread 0x7fdf910d3700 (LWP 30525))]
(gdb) bt
#0 0x00007fdf8f2e4de2 in __get_nprocs () at ../sysdeps/
#1 0x00007fdf8f25db51 in arena_get2 (size=size@
#2 0x00007fdf8f26369a in arena_get2 (avoid_arena=0x0, size=40) at malloc.c:2909
#3 __GI___libc_malloc (bytes=40) at malloc.c:2909
glibc version is like below
GNU C Library (Ubuntu GLIBC 2.23-0ubuntu7) stable release version 2.23, by Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.4.0 20160609.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<https:/
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu glibc Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: