1 /* Build with cc -lutil valgrind-ptsname.c */
12 * ==18203== Syscall param ioctl(generic) points to uninitialised byte(s)
13 * ==18203== at 0x49AAE7A: ioctl (in /lib/libc.so.7)
14 * ==18203== by 0x490C116: fdevname_r (in /lib/libc.so.7)
15 * ==18203== by 0x49E1567: ptsname (in /lib/libc.so.7)
16 * ==18203== by 0x486B5E2: openpty (in /lib/libutil.so.9)
17 * ==18203== by 0x2016E6: main (in /tmp/a.out)
18 * ==18203== Address 0x1ffc000a74 is on thread 1's stack
19 * ==18203== in frame #1, created by fdevname_r (???:)
23 /* Relevant bit from lib/libc/gen/fdevname.c */
25 fdevname_r(int fd
, char *buf
, int len
)
27 struct fiodgname_arg fgn
;
30 * buf here points to a `static` buffer in ptsname.c, these are the only
31 * two members of fiodgname_arg.
36 if (_ioctl(fd
, FIODGNAME
, &fgn
) == -1)
47 (void)openpty(&master
, &slave
, NULL
, NULL
, NULL
);