From owner-freebsd-questions@FreeBSD.ORG Wed Mar 21 15:33:39 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF9CF1065670 for ; Wed, 21 Mar 2012 15:33:39 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 9FED98FC14 for ; Wed, 21 Mar 2012 15:33:39 +0000 (UTC) Received: from mr17.lnh.mail.rcn.net ([207.172.157.37]) by smtp02.lnh.mail.rcn.net with ESMTP; 21 Mar 2012 11:33:33 -0400 Received: from smtp04.lnh.mail.rcn.net (smtp04.lnh.mail.rcn.net [207.172.157.104]) by mr17.lnh.mail.rcn.net (MOS 4.3.4-GA) with ESMTP id BKC08122; Wed, 21 Mar 2012 11:33:31 -0400 Received: from 209-6-86-84.c3-0.smr-ubr2.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.86.84]) by smtp04.lnh.mail.rcn.net with ESMTP; 21 Mar 2012 11:33:31 -0400 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20329.62663.506705.612245@jerusalem.litteratus.org> Date: Wed, 21 Mar 2012 11:33:27 -0400 To: Martin McCormick In-Reply-To: <201203211450.q2LEoPqM078354@dc.cis.okstate.edu> References: <201203211450.q2LEoPqM078354@dc.cis.okstate.edu> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr17.lnh.mail.rcn.net) Cc: freebsd-questions@freebsd.org Subject: Freebsd9.0 and the fgets directive in gcc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2012 15:33:40 -0000 Martin McCormick writes: > I've got some code which I wrote about 6 or 8 years ago that > apparently doesn't get along right now with FreeBSD9.0. In the > problem code, there is a loop that uses fgets to read a line > from a file. It runs properly until the 2708TH iteration and > then it dumps core with a segmentation fault. Have you built this program with debugging turned on? What does the core dump say? Respectfully, Robert Huff