| Summary: | Use of seekp() in C++ programs causes segfaults. | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Erich Zigler <erich> |
| Component: | gnu | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.2-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->Feedback Does this still occur with more recent releases? I can't reproduce it here. State Changed From-To: feedback->closed I cannot reproduce this on 4.5-RC either. |
Use of seekp() in C++ programs causes a segfault. Fix: Unknown. 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