pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/41638: existing patches for gcc >= 3.4 cause run time errors
>Number: 41638
>Category: pkg
>Synopsis: existing patches for gcc >= 3.4 cause run time errors
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 25 23:50:00 +0000 2009
>Originator: agrier%poofygoof.com@localhost
>Release: NetBSD 5.0_RC3
>Organization:
Aaron J. Grier | "Not your ordinary poofy goof." |
agrier%poofygoof.com@localhost
>Environment:
System: NetBSD boromir.poofy.goof.com 5.0_RC3 NetBSD 5.0_RC3 (GENERIC) #2: Fri
Mar 27 15:20:07 PDT 2009
agrier%boromir.poofy.goof.com@localhost:/var/obj/amd/aragorn/usr/projects/NetBSD/5/src/sys/arch/i386/compile/GENERIC
i386
Architecture: i386
Machine: i386
HEAD of pkgsrc (according to cvsweb)
>Description:
as of gcc 3.4, PRCS compiled from pkgsrc can no longer do checkins
without errors due to some changes in libstdc++(?).
>How-To-Repeat:
$ prcs checkin
prcs: Checking in project `foo' version 199.16.
prcs: Close `\37777777760\37777777674\013\010\37777777710kq\010\003' failed: :
Bad file descriptor
prcs: Failed updating repository data file`/projects/PRCS/src/prcs_data': Bad
file descriptor
prcs: Command failed.
this is caused by the stream destructor in
RebuildFile::update_project_data closing the descriptor for
/projects/PRCS/src/prcs_data , which MemorySegment::unmap() then
attempts to close a second time, failing miserably.
>Fix:
dup() the descriptor before passing it to stdio_filebuf, so it can be
closed without affecting anybody else. gcc < 3.4 used to have a
separate argument to control this behaviour which was apparently
removed.
replace patch-aa with the following:
diff -ur prcs-1.3.3.master/src/rebuild.cc prcs-1.3.3/src/rebuild.cc
--- prcs-1.3.3.master/src/rebuild.cc 2004-05-09 18:21:20.000000000 -0700
+++ prcs-1.3.3/src/rebuild.cc 2009-06-25 16:27:28.000000000 -0700
@@ -1001,6 +1001,9 @@
#elif __GNUG__ == 3 and __GNUC_MINOR__ < 2
buf = new filebuf(fdopen(dup(seg->fd()), "a+"), ios::out);
buf->pubseekoff(0, ios::end, ios::out);
+#elif __GNUG__ > 3 || (__GNUG__ == 3 && __GNUC_MINOR__ >= 4)
+ buf = new __gnu_cxx::stdio_filebuf<char> (dup(seg->fd()), ios::out,
default_segment_size);
+ buf->pubseekoff(0, ios::end, ios::out);
#else
buf = new __gnu_cxx::stdio_filebuf<char> (seg->fd(), ios::out,
false /* close */,
default_segment_size);
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index