Segfault in add_object_proc on amd64

Bug #250545 reported by Gwen Weinholt
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
High
Abdulaziz Ghuloum

Bug Description

I saw that you announced amd64 support in revision 1547, but I'm getting a segfault during compilation. dmesg has this message (the "at" and sp change between each run):
[29197.586126] ikarus[7533]: segfault at 2ac14541f4e4 ip 404e4c sp 7fff679b9980 error 6 in ikarus[400000+19000]

I'm running Debian testing with gcc version 4.3.1-2. Please let me know if you need more information.

(gdb) run -b ./ikarus.boot.8.prebuilt --r6rs-script makefile.ss
Starting program: /home/weinholt/src/ikarus.dev/src/ikarus -b ./ikarus.boot.8.prebuilt --r6rs-script makefile.ss

Program received signal SIGSEGV, Segmentation fault.
0x0000000000404e4c in add_object_proc (gc=0x7fffd72ea410, x=140251312533509) at ikarus-collect.c:197
197 gc->segment_vector[i] =
(gdb) bt
#0 0x0000000000404e4c in add_object_proc (gc=0x7fffd72ea410, x=140251312533509) at ikarus-collect.c:197
#1 0x000000000040642d in ik_collect (mem_req=96, pcb=0x1743010) at ikarus-collect.c:423
#2 0x0000000000414b48 in L_zero_args () at ikarus-enter.S:197
#3 0x000000000000002f in ?? ()
#4 0x0000000000000000 in ?? ()
(gdb) p *gc
$1 = {meta = {{ap = 140251304507072, aq = 140251304505344, ep = 140251304509440, base = 140251304505344}, {ap = 140251304472144, aq = 140251304468480,
      ep = 140251304472576, base = 140251304468480}, {ap = 0, aq = 0, ep = 0, base = 0}, {ap = 0, aq = 0, ep = 0, base = 0}, {ap = 140251304492832, aq = 140251304488960,
      ep = 140251304493056, base = 140251304488960}, {ap = 140251304493152, aq = 140251304493056, ep = 140251304497152, base = 140251304493056}}, queues = {0x0,
    0x1744910, 0x0, 0x0, 0x1743350, 0x0}, pcb = 0x1743010, segment_vector = 0x7f6ee9507000, collect_gen = 1, collect_gen_tag = 42, tconc_ap = 0, tconc_ep = 0,
  tconc_base = 0, tconc_queue = 0x0, forward_list = 0x0}

Related branches

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

I will check it out once I get debian64 installed.

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

You might want to try the following (not tested).

In ikarus-collect.c in enqueue_large_ptr, change the types of i and j to be
  long int i = page_index(mem);
  long int j = page_index(mem+size-1);

and see what happens.

Revision history for this message
Gwen Weinholt (weinholt) wrote :

Yep, after changing the types to long int, Ikarus builds and seems to work.

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in 1548 along with another bug in the assembler. Thanks.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → High
status: New → Fix Committed
Changed in ikarus:
milestone: none → 0.0.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.