Subject: bug#39118: Segfault while building on 64-bit Cygwin

From: szgyg <[email-masked]>
Date: Mon, 3 Feb 2020 23:11:38 +0100

On Fri, Jan 31, 2020 at 09:23:19AM -0500, John Cowan wrote:
> Aaaand... Cygwin doesn't do core dumps. Under the skin it's WIndows, after
> all.  This is what I get when I specify ulimit -c unlimited and rebuild:
> [...]

Please see my previous mail on how to get a real core dump on cygwin
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39118#28

>> On Sat, Jan 25, 2020 at 8:51 AM Ludovic Courtès <[email-masked]> wrote:
>>
>>> That I understand.  However, I was asking for the backtrace of the crash
>>> on Cygwin when JIT is enabled.  Could you grab it?

#v+
  BOOTSTRAP GUILEC ice-9/eval.go
  BOOTSTRAP GUILEC ice-9/psyntax-pp.go
  BOOTSTRAP GUILEC language/cps/intmap.go
  BOOTSTRAP GUILEC language/cps/intset.go
  BOOTSTRAP GUILEC language/cps/graphs.go
  BOOTSTRAP GUILEC ice-9/vlist.go
  BOOTSTRAP GUILEC srfi/srfi-1.go

Thread 1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 7444.0x2640]
0x000000055a8b1b25 in scm_to_uint64 (val=val@entry=0xffffffffffffff90) at ../../guile-3.0.0/libguile/conv-uinteger.i.c:44
44        else if (SCM_BIGP (val))
(gdb) bt
#0  0x000000055a8b1b25 in scm_to_uint64 (val=val@entry=0xffffffffffffff90) at ../../guile-3.0.0/libguile/conv-uinteger.i.c:44
#1  0x000000055a86b1ea in scm_bytevector_copy_x (source=0x700000948620, source_start=0x34964a, target=0x700000907600, target_start=0x2, len=0xffffffffffffff90)
    at ../../guile-3.0.0/libguile/bytevectors.c:604
#2  0x00006ffffe743866 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

  BOOTSTRAP GUILEC language/tree-il.go

(gdb) bt
#0  0x000000055a8b1b25 in scm_to_uint64 (val=val@entry=0xffffffffffffff90)
    at ../../guile-3.0.0/libguile/conv-uinteger.i.c:44
#1  0x000000055a86b1ea in scm_bytevector_copy_x (source=0x70000055f160, source_start=0x34964a, target=0x700000808c90,
    target_start=0x2, len=0xffffffffffffff90) at ../../guile-3.0.0/libguile/bytevectors.c:604
#2  0x00006ffffe73f936 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

  BOOTSTRAP GUILEC language/tree-il/analyze.go

(gdb) bt
#0  0x000000055a8b1b25 in scm_to_uint64 (val=val@entry=0xffffffffffffff90)
    at ../../guile-3.0.0/libguile/conv-uinteger.i.c:44
#1  0x000000055a86b1ea in scm_bytevector_copy_x (source=0x700000645160, source_start=0x34964a, target=0x7000008012d0,
    target_start=0x2, len=0xffffffffffffff90) at ../../guile-3.0.0/libguile/bytevectors.c:604
#2  0x00006ffffe753fc6 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

^C
#v-

s