[cmucl-imp] gc & blocked signals

Carl Shapiro carl.shapiro at gmail.com
Sat Feb 4 00:47:46 UTC 2012


On Fri, Feb 3, 2012 at 9:15 AM, Raymond Toy <toy.raymond at gmail.com> wrote:
> NSIG = 65 and LONG_BIT = 32 on my machine, so memcpy only copies 2 bytes.
> I think we really want to copy at least 64 bits or 8 bytes.  If I modify
> this code to copy 8 bytes, SigBlk is now 0 after returning, and C-c
> continues to work.

This looks like my fault

http://common-lisp.net/gitweb?p=projects/cmucl/cmucl.git;a=commit;h=342beebbfed6718f0bbc4276f29a18d0f7356ec8

LONG_BIT should have been CHAR_BIT.

I am surprised that the C library NSIG is now 65.  When I made this
change, the C library on the machine I used defined NSIG as 1024 but
the kernel data structure knew it was 64.  For example, compare

http://lxr.linux.no/#linux+v3.2.4/arch/x86/include/asm/signal.h

with

http://fxr.watson.org/fxr/source/sysdeps/unix/sysv/linux/bits/signum.h?v=GLIBC27#L69

Using the wrong definition of NSIG may cause a corruption.


More information about the cmucl-imp mailing list