pkgsrc-Users archive

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

Re: rustc panic



Rust fails in thread.rs as follows:

...........
           let mut guardsize = 0;
            assert_eq!(libc::pthread_attr_getguardsize(&attr, &mut guardsize), 0);
            if guardsize == 0 {
                panic!("there is no guard page");
            }
...........
Before the patch the guardsize was taken from the pagesize, as in:

 *guard = (size_t)sysconf(_SC_PAGESIZE);

After the patch this became:

 *guard = pthread__guardsize; 

from the global, which is initialized elsewhere in pthread.c:
---
mib[0] = CTL_VM;
mib[1] = VM_THREAD_GUARD_SIZE;
len = sizeof(value);
if (sysctl(mib, __arraycount(mib), &value, &len, NULL, 0) == 0)
        pthread__guardsize = value;
else
        pthread__guardsize = pthread__pagesize;
---

There is no invocation of pthread_set_guardsize in rustc, so it should be getting the default from the sysctl, i.e. 65536, but for some reason it is getting a zero. I maybe missing something obvious, I couldn't see it by reading only. 

Chavdar 


On Wed, 26 Jul 2017 at 22:59 Swift Griggs <swiftgriggs%gmail.com@localhost> wrote:
On Wed, 26 Jul 2017, Jonathan A. Kollasch wrote:
> Do you want a working web browser or not?  Apparently not.

Is XULrunner or Firefox or something now tied to rustc ? I'm not being
trite, I'm really asking. Can it not be stubbed out ?  Yes, I totally want
a working browser, but forcing folks to use/learn Rust in the bargain
seems a bit draconian/silly/ill-advised. Maybe that's just my
anachronistic perspective (and maybe Google and Mozilla.org don't give a
damn, either, I get that).

Then again, I've never credited web-browsers as being the programmer's
high art, either. They seem to have a knack for shooting other people's
feet off, anyway, historically speaking.

I'm not trying to bag on Rust. I'm just wondering if this weird gene-drive
for Rust really what's going on here. Ie... people are trying to wedge in
new language requirements to existing software where it really doesn't
seem to be a good fit and it darn sure wasn't there before.

-Swift




Home | Main Index | Thread Index | Old Index