Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#736 closed defect (fixed)

ttyfd conflicts

Reported by: Ralf Corsepius Owned by: Eric Norum
Priority: highest Milestone: 2
Component: network/legacy Version: unknown
Severity: critical Keywords:
Cc: bugs@…, joel.sherrill@…, osv@… Blocked By:
Blocking:

Description

GCC-4.0.x chokes on broken code in pppd:

...
if arm-rtems4.7-gcc --pipe -B../../../../lib/ -B../../../../arm_bare_bsp/lib/ -specs bsp_specs -qrtems -DPACKAGE_NAME=\"rtems-c-src\" -DPACKAGE_TARNAME=\"rtems-c-src\" -DPACKAGE_VERSION=\"4.6.99.1\" -DPACKAGE_STRING=\"rtems-c-src\ 4.6.99.1\" -DPACKAGE_BUGREPORT=\"rtems-bugs@…\" -I. -I../../../../../../../rtems.work/c/src/libnetworking/pppd -isystem ../../../../arm_bare_bsp/lib/include -O2 -msoft-float -g -Wall -MT libpppd_a-chat.o -MD -MP -MF ".deps/libpppd_a-chat.Tpo" -c -o libpppd_a-chat.o test -f 'chat.c' || echo '../../../../../../../rtems.work/c/src/libnetworking/pppd/'chat.c; \
then mv -f ".deps/libpppd_a-chat.Tpo" ".deps/libpppd_a-chat.Po"; else rm -f ".deps/libpppd_a-chat.Tpo"; exit 1; fi
../../../../../../../rtems.work/c/src/libnetworking/pppd/chat.c:166: error: static declaration of 'ttyfd' follows non-static declaration
../../../../../../../rtems.work/c/src/libnetworking/pppd/pppd.h:144: error: previous declaration of 'ttyfd' was here
gmake[4]: * [libpppd_a-chat.o] Error 1
gmake[4]: Leaving directory `/users/rtems/src/rtems-cvs/build/arm/arm-rtems4.7/c/arm_bare_bsp/libnetworking/pppd'
gmake[3]:
* [all-recursive] Error 1

AFAIS, GCC-4.x is right, the code is broken.

Release:
All, GCC >= 4.0.x

Change History (3)

comment:1 Changed on 01/20/05 at 16:01:16 by Joel Sherrill

Status: assignedclosed

comment:2 Changed on 01/31/05 at 12:15:07 by osv2

From: osv@…
To: bugs
Cc:
Subject: Fix commited for PR736 breaks pppd.
Date: Mon, 31 Jan 2005 07:15:07 -0600

Notify-List:
Category: pppd
Synopsis: Fix commited for PR736 breaks pppd.
Confidential: no
Severity: critical
Priority: high
Class: sw-bug
Submitter-Id: net
Originator: Sergei Organov
Release: 4.6.99.1
Organization:
Environment:
Description:

The fix committed to fix PR736 breaks chat. Chat should have its own static ttyfd for pppd to work correctly. The symptom is that second invokation of chat (for connect script) fails due to pppd_ttyfd set to -1 by previous chat invokation (for init script).


The attached patch fixes it. In addition, it fixes leaving of dangling pointer in the abort_string[] by chat_send().

How-To-Repeat:
Fix:

The attached patch fixes both the PR736 itself (not actually checked) as well as broken PR736 fix.

Unformatted:

----gnatsweb-attachment----
Content-Type: application/x-tar; name="rtems-cvs-20050121-chat-ttyfd.patch.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="rtems-cvs-20050121-chat-ttyfd.patch.gz"


H4sICIYr/UEAA3J0ZW1zLWN2cy0yMDA1MDEyMS1jaGF0LXR0eWZkLnBhdGNoAMVWbW/bNhD+LP2K
AwZkkmVFkhO/N0PcLEUzNC+I3W5AEAgyRcVEbckjqSRdkf++IynbspOlATZg+hDKvLvnniOfO+Us
T+njAEggOAnmbJpT+VDwryy/C5bLZRpwSRdikbB8n9hH6xr0/GkLE5HUBQCh4FJ1/GJkfwFgrN
e5tTyRm9RytwXAQrcoj223bKsgz8EnyOv6BO2/f9N9VntUL4LcmhFYZtiLqDMBwc9MAP8bFUBs/z
3oZzUMfpDQ7baxz7+Bj8brfZBU
PT62gcwSDrNCyDxZ0Jvz0R8Xo/PTT6cXt0MraMBluTFCI7BB
yEQyYqIwc5zSe7SpuKvR5KOOA4zT/kUGV1dXIOU3cBbJtylVr8tHVwPZPrqxXCqUNEZDlg4ty2rA
mHKWzGFZcKmvClIqCGdLWXAV6D2PCX4YpBNNkzKNeSJpFTMissSYKZMiEJQUeQoZugsDhYUxQtfB
szK/K5dVpKR8wXJ0miUCppTm2gzlcu2+5OweadzRFcEH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huber

Component: pppdnetwork/legacy
Note: See TracTickets for help on using tickets.