[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Posix Test Failure
From: |
Christian Kellermann |
Subject: |
Re: [Chicken-users] Posix Test Failure |
Date: |
Sun, 14 Apr 2013 21:38:33 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi!
* J Altfas <address@hidden> [130414 08:23]:
> After reading #1005, I was trying to understand what was going
> on that accounts for the -1 result in 32 bit systems vs. 0 under
> 64 bit OS. Attempting to learn about it, I ran a scheme program
> using the mmap API directly--the relevant lines are:
Those have been nice tests and you are on the right track!
> This looks exactly like the prior results. The pointer object
> reports 0 rather than -1, but curiously, (pointer->address) seems
> to correctly dereferences the result (-1), though obscurely prints
> the unsigned long in exponential format.
That's due to a bug of the way the pointer object gets printed and
kind of obscures the real issue.
> It appears something happens in setting/getting the data member
> of the pointer object scheme-block structure. That code is kind
> of convoluted, and I don't yet understand it well enough to comment
> further.
Yep, that's where I am looking at next.
> Long-winded I know, but I'm wondering if mmap is the only c-pointer
> that's affected, and if not, is it causing trouble elsewhere?
Not many APIs use a negative void pointer for errors. I guess that's
the main reason why.
Thanks Jules for looking into this!
Christian
--
In the world, there is nothing more submissive and weak than
water. Yet for attacking that which is hard and strong, nothing can
surpass it. --- Lao Tzu