pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/39840: robustify ncc
>Number: 39840
>Category: pkg
>Synopsis: robustify ncc
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 31 14:30:00 +0000 2008
>Originator: Marko Schuetz
>Release: NetBSD prpad.dyndns.org 4.99.72 NetBSD 4.99.72 (PRPAD) #5: Mon
>Aug 4 21:20:09 AST 2008
>marko%prpad.dyndns.org@localhost:/usr/obj/sys/arch/i386/compile/PRPAD i386
>Organization:
individual
>Environment:
NetBSD prpad.dyndns.org 4.99.72 NetBSD 4.99.72 (PRPAD) #5: Mon Aug 4 21:20:09
AST 2008 marko%prpad.dyndns.org@localhost:/usr/obj/sys/arch/i386/compile/PRPAD
i386
>Description:
ncc segfaults on some sources using nested structs, unions and (anonymous) bit
fields (e.g. common/lib/libprop/prop_rb.c)
>How-To-Repeat:
create a file ncc-segfault.c containing:
struct rb_node {
int n_i;
union {
struct {
unsigned int : 28;
unsigned int s_root : 1;
unsigned int s_position : 1;
unsigned int s_color : 1;
unsigned int s_sentinel : 1;
} u_s;
unsigned int u_i;
} rb_u;
};
struct rb_node sentinel_node = {
.n_i = 1;
};
run
ncc ncc-segfault.c
>Fix:
add patches/patch-ae (fix suggested by upstream):
--- cdb.C.orig 2008-10-11 14:57:21.000000000 +0000
+++ cdb.C
@@ -394,6 +394,9 @@ void close_region ()
lookup_t *Lookup (Symbol s, bool tagged, RegionPtr r)
{
+ if (s == -1)
+ return NULL;
+
lookup_t *t = lookup_table [s - SYMBASE];
if (tagged) for (; t; t = t->next) {
@@ -1175,6 +1178,7 @@ void aeqn::prstruct (RegionPtr p)
txt [txti++] = UNI;
for (m = regions [p].first; m; m=m->next) {
L = Lookup (m->s, false, p);
+ if (!L) continue;
txt [txti++] = m->s;
base = base_of (L->info.tdf);
spec = spec_of (L->info.tdf);
patch files in devel/ncc (this also adds installation of a script file used by
nccld that was previously not installed):
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ncc/Makefile,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 Makefile
22a23
> PYTHON_PATCH_SCRIPTS+= ${WRKSRC}/scripts/nccstrip2.py
29a31
> ${INSTALL_SCRIPT} ${WRKSRC}/scripts/nccstrip2.py ${PREFIX}/bin
39a42
> .include "../../lang/python/application.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ncc/PLIST,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 PLIST
6a7
> bin/nccstrip2.py
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ncc/distinfo,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 distinfo
9a10
> SHA1 (patch-ae) = 2397a601229a211c379450b83cad69fcfd6d9022
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index