-
Notifications
You must be signed in to change notification settings - Fork 5
PLT hook segfault about GCC 7 #1
Copy link
Copy link
Open
Description
There is no this problem of uftrace built by gcc 5.4.1.
But when building uftrace by gcc 7.0.1, I found the segmentation fault about PLT hook like below.
# normal tracing
$ uftrace tests/t-abc
WARN: invalid task file
child terminated by signal: 11: Segmentation fault
# DURATION TID FUNCTION
But if using --no-libcall, the segmentation fault didn't appear.
$ uftrace --no-libcall t-abc
# DURATION TID FUNCTION
[ 5133] | main() {
[ 5133] | a() {
[ 5133] | b() {
0.982 us [ 5133] | c();
1.854 us [ 5133] | } /* b */
2.170 us [ 5133] | } /* a */
2.792 us [ 5133] | } /* main */
If checking core file, you can see libmcount/plthook.c:429
Reading symbols from t-abc...(no debugging symbols found)...done.
[New LWP 5249]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `t-abc'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff5a1b8a322 in plthook_entry (ret_addr=0x7ffd79fb0378, child_idx=1,
module_id=140692961395048, regs=0x7ffd79fb0338)
at /home/taeung/git/uftrace/libmcount/plthook.c:429
429 struct ftrace_trigger tr = {
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels