[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #1459: segfault violation with thread-sleep! on a flo
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #1459: segfault violation with thread-sleep! on a flonums |
Date: |
Mon, 30 Apr 2018 17:54:38 -0000 |
#1459: segfault violation with thread-sleep! on a flonums
------------------------+--------------------------------
Reporter: kristianlm | Owner:
Type: defect | Status: new
Priority: major | Milestone: someday
Component: unknown | Version: 5.0
Keywords: | Estimated difficulty:
------------------------+--------------------------------
When I run thread-sleep! under certain conditions, I get a segfault. I
think this is a bug.
{{{
1944 address@hidden ~/p/e/c/tests ➤ cat thread-sleep-segfault.scm
(import srfi-18)
(thread-start!
(lambda () (thread-sleep! 2.1)))
1944 address@hidden ~/p/e/c/tests ➤ csi5 -s thread-sleep-segfault.scm # works
1946 address@hidden ~/p/e/c/tests ➤ csc5 thread-sleep-segfault.scm
1947 address@hidden ~/p/e/c/tests ➤ ./thread-sleep-segfault # works
1944 address@hidden ~/p/e/c/tests ➤ csi5 thread-sleep-segfault.scm # fails
CHICKEN
(c) 2008-2018, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.0.0 (rev 4e1f1a7c)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
; loading thread-sleep-segfault.scm ...
; loading /home/klm/.chickens/master/lib/chicken5/9/srfi-18.import.so ...
; loading
/home/klm/.chickens/master/lib/chicken5/9/chicken.flonum.import.so ...
; loading /home/klm/.chickens/master/lib/chicken5/9/srfi-18.so ...
#;1>
Warning (#<thread: thread351>): in thread: segmentation violation
Call history:
<eval> (thread-sleep! 2.1) <--
}}}
I've tried various values for thread-sleep!:
- fixnums seem to work ok
- some rational numbers seem to work
- I don't think any inexact numbers work
- 0.5 does not work
- 1/2 works!
- 1/3 does not work
If I add '(thread-sleep! 3)' at the end of the file, everything seems to
work again. Maybe the `repl` is causing this?
--
Ticket URL: <https://bugs.call-cc.org/ticket/1459>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #1459: segfault violation with thread-sleep! on a flonums,
Chicken Trac <=