Hello,
I have noticed that the libc error is caused by this vtable_check when dce_fdopen is called. Please find below called function stacktrace:
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff4136801 in __GI_abort () at abort.c:79
#2 0x00007ffff417f5e5 in __libc_message (action=(do_abort | do_backtrace), fmt=0x7ffff42ac796 "%s", fmt=0x7ffff42ac796 "%s", action=(do_abort | do_backtrace))
at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff417f92a in __GI___libc_fatal (message=message@entry=0x7ffff42ae3b8 "Fatal error: glibc detected an invalid stdio handle\n")
at ../sysdeps/posix/libc_fatal.c:191
#4 0x00007ffff41801d7 in _IO_vtable_check () at vtables.c:72
#5 0x00007ffff4176cb1 in IO_validate_vtable (vtable=0x7ffff7dd1da0 <dce_fdopen::vtable>) at ../libio/libioP.h:876
#6 _IO_seekoff_unlocked (fp=0x55555581ee50, offset=-1, dir=<optimized out>, mode=<optimized out>) at ioseekoff.c:59
#7 0x00007ffff417dcd9 in __GI_fseek (fp=0x55555581ee50, offset=<optimized out>, whence=<optimized out>) at fseek.c:36
#8 0x00007ffff7a811fb in dce_fseek (stream=0x55555581ee50, offset=-1, whence=0) at ../model/dce-stdio.cc:580#9 0x00007ffff7a7c9bf in dce_fdopen (fildes=0, mode=0x7ffff7b58d7d "r") at ../model/dce-stdio.cc:208
#10 0x00007ffff7aa0009 in dce_global_variables_setup (variables=0x7ffff374ab70) at ../model/dce-global-variables.cc:22
#11 0x00007ffff2d71793 in setup_global_variables () at ../model/libc-setup.cc:37
#12 0x00007ffff2d716e2 in libc_setup (fn=0x555555925cd0) at ../model/libc.cc:225
#13 0x00007ffff7a1b599 in ns3::DceManager::LoadMain (ld=0x55555582fd50, filename="/work/git/dce_dev_alex/bake/build/sbin/ip", proc=0x55555583b4c0,
err=@0x7ffff374acf4: 0) at ../model/dce-manager.cc:1227
#14 0x00007ffff7a149a1 in ns3::DceManager::PrepareDoStartProcess (current=0x55555583c020) at ../model/dce-manager.cc:267
#15 0x00007ffff7a14ebe in ns3::DceManager::DoStartProcess (context=0x55555583c020) at ../model/dce-manager.cc:292
#16 0x00007ffff7aae030 in ns3::TaskManager::Trampoline (context=0x5555558269e0) at ../model/task-manager.cc:275
#17 0x00007ffff7aa715b in ns3::UcontextFiberManager::Trampoline (a0=32767, a1=-139796500, a2=21845, a3=1434610144) at ../model/ucontext-fiber-manager.cc:199
#18 0x00007ffff414e6b0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#19 0x0000000000000000 in ?? ()
Has somebody managed to bypass somehow VTABLE checking ?
Thank you in advance for help!
Best regards,
Cosmin