|
Description
|
while porting a script to linux i noticed the following assertion failure:
---8<---
edp@secrassic$ echo | telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Assertion failed: (stat->st_mode & S_IFMT) == S_IFCHR, file ../common/ioctl.c, line 260
...
> $c0
LM2`libc.so.1`_lwp_kill+7()
LM2`libc.so.1`raise+0x22()
LM2`libc.so.1`abort+0xcd()
LM2`libc.so.1`_assert+0x6e()
LM2`lx_brand.so.1`ldlinux_check+0x45()
LM2`lx_brand.so.1`ict_tcsets+0x68()
LM2`lx_brand.so.1`lx_ioctl+0x10b()
LM2`lx_brand.so.1`lx_emulate+0x1f6()
0xfefdf77c()
libc.so.6`tcsetattr+0xb1()
0x804de81()
0x804e316()
0x805191b()
0x804c621()
0x804d3ea()
libc.so.6`__libc_start_main+0xda()
0x8049801()
---8<---
the reason the assert went off is because ldlinux_check() was called with a
non-device file descriptor. this is actually a valid condition. the
TCSETS* and TCGETS* family of ioctls all call ldlinux_check() and in our
translator rules are listed as supported for all streams based file descriptors,
but not all streams are devices. hence this assert should be removed.
this fix was putback into the brandz gate at the last minute and then
backed out because it introduced a lint "arg unused" error.
|