pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48824: pbulk build failure



>Number:         48824
>Category:       pkg
>Synopsis:       pbulk build failure: argument may be clobbered
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 20 13:20:00 +0000 2014
>Originator:     Patrick Welche (local)
>Release:        NetBSD 6.99.42
>Organization:
>Environment:
NetBSD-current/amd64
>Description:
Building pbulk from today's pkgsrc on today's current fails with:

--- pbuild.o ---
pbuild.c: In function 'build_package':
pbuild.c:175:27: error: argument 'build_info' might be clobbered by 'longjmp' 
or 'vfork' [-Werror=clobbered]
 build_package(const char *build_info, size_t len)
                           ^
pbuild.c:175:46: error: argument 'len' might be clobbered by 'longjmp' or 
'vfork' [-Werror=clobbered]
 build_package(const char *build_info, size_t len)
                                              ^

This is with base gcc 4.8.3.
>How-To-Repeat:
cd pkgtools/pbulk
make
>Fix:
The following workaround allows pbulk to build for me.

Index: files/pbulk/pbuild/pbuild.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pbulk/files/pbulk/pbuild/pbuild.c,v
retrieving revision 1.6
diff -u -r1.6 pbuild.c
--- files/pbulk/pbuild/pbuild.c 14 Jan 2013 14:33:28 -0000      1.6
+++ files/pbulk/pbuild/pbuild.c 13 May 2014 10:25:19 -0000
@@ -172,7 +172,7 @@
 }
 
 int
-build_package(const char *build_info, size_t len)
+build_package(const char * volatile build_info,  volatile size_t len)
 {
        struct sigaction sa;
        int input[2];
Index: files/pbulk/pbuild/pbuild.h
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pbulk/files/pbulk/pbuild/pbuild.h,v
retrieving revision 1.6
diff -u -r1.6 pbuild.h
--- files/pbulk/pbuild/pbuild.h 27 Nov 2011 19:53:30 -0000      1.6
+++ files/pbulk/pbuild/pbuild.h 13 May 2014 10:25:20 -0000
@@ -116,7 +116,7 @@
 void                    init_jobs(const char *, const char *, const char *);
 struct build_job       *get_job(void);
 void                    process_job(struct build_job *, enum job_state, int);
-int                     build_package(const char *, size_t);
+int                     build_package(const char * volatile, volatile size_t);
 void                    finish_build(const char *);
 void                    build_stats(struct build_stat *);
 
===================================================================



Home | Main Index | Thread Index | Old Index