[Bug libc/21276] gettimeofday() segfaults when called before libc init() and before calling _dl_vdso_vsym()
Vinitha.Vijayann at gmail dot com
sourceware-bugzilla@sourceware.org
Mon Mar 20 18:13:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=21276
--- Comment #2 from Vinitha Vijayan <Vinitha.Vijayann at gmail dot com> ---
I am tracing pthread library using Pthread Trace Tool
(http://nptltracetool.sourceforge.net/). The initialization of ptt tracing, is
done after pthread_initialization in the _init section. Here to get the
timestamp, gettimeofday() is called. HP-TIMING cannot be used here as ARM
doesn't support that.
For earlier version of glibc, this was working fine.
Since the vdso support was enabled for gettimeofday, this SEGV is observed.
To test the threaded application, ptt daemon forks the application and preloads
the pthread library( with trace points enabled).
So libpthread is getting initialized first.
Then the glibc init is called, after which the _dl_vdso_vsym() is called.
So gettimeofday() is called before the _dl_vdso_vsym() is called to fixup
__vdso_gettimeofday.
Hope this is clear :(
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list