Package: empty-expect
Version: 0.6.18b
Bug reproduced:
Build:
gcc -O2 -lutil -o empty empty-expect-0.6.18b/empty.c
empty-expect-0.6.18b/empty.c: In function 'main':
empty-expect-0.6.18b/empty.c:613: warning: ignoring return value of
'write', declared with attribute warn_unused_result
empty-expect-0.6.18b/empty.c:616: warning: ignoring return value of
'write', declared with attribute warn_unused_result
empty-expect-0.6.18b/empty.c:619: warning: ignoring return value of
'write', declared with attribute warn_unused_result
empty-expect-0.6.18b/empty.c:628: warning: ignoring return value of
'write', declared with attribute warn_unused_result
empty-expect-0.6.18b/empty.c:631: warning: ignoring return value of
'write', declared with attribute warn_unused_result
empty-expect-0.6.18b/empty.c:634: warning: ignoring return value of
'write', declared with attribute warn_unused_result
In file included from /usr/include/string.h:640,
from empty-expect-0.6.18b/empty.c:95:
In function 'strncat',
inlined from 'main' at empty-expect-0.6.18b/empty.c:587:
/usr/include/bits/string3.h:154: warning: call to
__builtin___strncat_chk might overflow destination buffer
Execute:
test.sh
#!/bin/bash
./empty -v -f -i "in" -o "out" -p pid_file -L "log_empty" "telnet"
"switch-hp-xxx.rg.net" &
./test.sh
cat log_empty
<<<Trying 10.11.220.4...
Connected to switch-hp-xxx.rg.net.
Escape character is '^]'.
SESSION TERMINATED, CONNECT AGAIN
HP J4819A PROCURVE SWITCH 5308XL
SOFTWARE REVISION E.10.67
COPYRIGHT (C) 1991-2007 HEWLETT-PACKARD CO. ALL RIGHTS RESERVED.
RESTRICTED RIGHTS LEGEND
USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
RESTRICTIONS
AS SET FORTH IN SUBDIVISION (B) (3) (II) OF THE RIGHTS IN TECHNICAL
DATA AND
COMPUTER SOFTWARE CLAUSE AT 52.227-7013.
HEWLETT-PACKARD COMPANY, 3000 HANOVER ST., PALO ALTO, CA 94303
WE'D LIKE TO KEEP YOU UP TO DATE ABOUT:
* SOFTWARE FEATURE UPDATES
* NEW PRODUCT ANNOUNCEMENTS
* SPECIAL EVENTS
PLEASE REGISTER YOUR PRODUCTS NOW AT: WWW.PROCURVE.COM
USERNAME:
THIS IS BUG! All text in uppercase.
Trouble in optimization options: -O2
If build without optimization mode:
gcc -lutil -o empty empty-expect-0.6.18b/empty.c
./test.sh
<<<Trying 10.11.220.4...
Connected to switch-hp-xxx.rg.net.
Escape character is '^]'.
Session Terminated, Connect again
HP J4819A ProCurve Switch 5308xl
Software revision E.10.67
Copyright (C) 1991-2007 Hewlett-Packard Co. All Rights Reserved.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to
restrictions
as set forth in subdivision (b) (3) (ii) of the Rights in Technical
Data and
Computer Software clause at 52.227-7013.
HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303
We'd like to keep you up to date about:
* Software feature updates
* New product announcements
* Special events
Please register your products now at: www.ProCurve.com
Username:
This is normal!
In shell:
./empty -v -f -i "in" -o "out" -p pid_file -L "log_empty" "telnet"
"switch-hp-xxx.rg.net"
BUG don't reproduced. Normal result!
In shell script:
#!/bin/sh
./empty -v -f -i "in" -o "out" -p pid_file -L "log_empty" "telnet"
"switch-hp-xxx.rg.net"
BUG don't reproduced. Normal result!
In shell script and background mode:
#!/bin/sh
./empty -v -f -i "in" -o "out" -p pid_file -L "log_empty" "telnet"
"switch-hp-xxx.rg.net" &
BUG result!
gcc --version
gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5) 4.4.3
OS: ubuntu lts 10.04
kernel: 2.6.32-5
Please add to debian/rules:
DEB_BUILD_OPTIONS += noopt
dpkg -s perl | grep ^Version:
Version: 5.10.1-8ubuntu2
dpkg -s libc6 | grep ^Version
Version: 2.11.1-0ubuntu7.2
Best regards, Lebedev Vadim
The senior system administrator
Russia Newspaper