Skip site navigation (1)Skip section navigation (2)
Date:      5 Jan 2001 04:37:32 -0000
From:      Erich Zigler <erich@tacni.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   gnu/24082: seekp() C++ Bug
Message-ID:  <20010105043732.97344.qmail@prydn.tacni.net>
Resent-Message-ID: <200101050440.f054e0r81897@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         24082
>Category:       gnu
>Synopsis:       Use of seekp() in C++ programs causes segfaults.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 04 20:40:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

	FreeBSD prydn.tacni.net 4.2-STABLE FreeBSD 4.2-STABLE #0: Wed Jan  3 17:21:58 CST 2001     root@prydn.tacni.net:/usr/obj/usr/src/sys/PRYDN  i386

>Description:

	Use of seekp() in C++ programs causes a segfault.

>How-To-Repeat:

	This is a test program to repeat the segfault...

Begin test-seekp.cc
--

#include <iostream.h>
#include <fstream.h>

int main(void)
{
    ofstream *log = NULL;

    log = new ofstream("test-seekp.out", ios::out | ios::ate);
    if (log != NULL && log->is_open())
    {
        log->seekp(0, ios::end);
        *log << "Here is some data" << endl;
    } else {
        cout << "Error opening file." << endl;
        return 1;
    }

    return 0;
}

EOF

Compiled: g++ test-seekp.cc -o test-seekp 

>Fix:

	Unknown.


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010105043732.97344.qmail>