pkgsrc-Users archive

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

Re: rustc panic



I see http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libpthread/pthread_attr.c?rev=1.18&content-type=text/x-cvsweb-markup&_only_with_tag_=MAIN to claim rustc panic is fixed. It is not - the above test program still returns 0 and rustc panics as before. 

Chavdar


On Fri, 28 Jul 2017 at 17:19 Martin Husemann <martin%duskware.de@localhost> wrote:
And here is a patch that fixes it - just init the defaults in
attr->pta_private whenever allocating it.

Joerg, is that the right fix? It makes rustc (and my test program)
work again.

Martin

Index: pthread_attr.c
===================================================================
RCS file: /cvsroot/src/lib/libpthread/pthread_attr.c,v
retrieving revision 1.17
diff -u -p -r1.17 pthread_attr.c
--- pthread_attr.c      2 Jul 2017 16:41:32 -0000       1.17
+++ pthread_attr.c      28 Jul 2017 16:15:57 -0000
@@ -63,6 +63,8 @@ pthread__attr_init_private(pthread_attr_
                memset(p, 0, sizeof(*p));
                attr->pta_private = p;
                p->ptap_policy = SCHED_OTHER;
+               p->ptap_stacksize = pthread__stacksize;
+               p->ptap_guardsize = pthread__guardsize;
        }
        return p;
 }



Home | Main Index | Thread Index | Old Index