#4506: program fails with "Segmentation fault/access violation in generated
code"
--------------------------------+-------------------------------------------
Reporter: HolgerReinhardt | Owner: igloo
Type: bug | Status: new
Priority: highest | Milestone: 7.0.2
Component: Runtime System | Version: 7.0.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Windows | Blocking:
Architecture: x86 | Failure: Runtime crash
--------------------------------+-------------------------------------------
Changes (by simonmar):
* owner: simonmar => igloo
Comment:
Over to Ian, this looks like a crash in the new memory-freeing code on
Windows.
{{{
Program received signal SIGSEGV, Segmentation fault.
0x005c0857 in osReleaseFreeMemory () at rts\win32\OSMem.c:273
273 fb_end = fb->base + fb->size;
(gdb) where
#0 0x005c0857 in osReleaseFreeMemory () at rts\win32\OSMem.c:273
#1 0x005bc55b in returnMemoryToOS (n=0) at rts\sm\BlockAlloc.c:702
#2 0x005b9e44 in GarbageCollect (force_major_gc=rtsFalse, gc_type=0,
cap=0x6310a0) at rts\sm\GC.c:758
#3 0x005b349d in scheduleDoGC (cap=0x6310a0, task=0xa49818,
force_major=rtsFalse) at rts\Schedule.c:1418
#4 0x005b2cd1 in schedule (initialCapability=0x6310a0, task=0xa49818)
at rts\Schedule.c:539
#5 0x005b3a01 in scheduleWaitThread (tso=0x2180000, ret=0x0,
cap=0x6310a0)
at rts\Schedule.c:1902
#6 0x005b6353 in rts_evalLazyIO (cap=0x6310a0, p=0x5e2050, ret=0x0)
at rts\RtsAPI.c:494
#7 0x005a7071 in real_main () at rts\RtsMain.c:66
#8 0x005a7216 in hs_main (argc=3, argv=0xa41a80,
main_init=0x40167c <__stginit_ZCMain>, main_closure=0x5e2050)
at rts\RtsMain.c:115
#9 0x004016b4 in main ()
(gdb) p memInventory()
Too few arguments in function call.
(gdb) p memInventory(1)
Memory inventory:
gen 0 blocks : 33 blocks (0 MB)
gen 1 blocks : 523 blocks (2 MB)
nursery : 128 blocks (0 MB)
retainer : 0 blocks (0 MB)
arena blocks : 0 blocks (0 MB)
exec : 0 blocks (0 MB)
free : 2364 blocks (9 MB)
total : 3048 blocks (11 MB)
$1 = void
(gdb) up
#1 0x005bc55b in returnMemoryToOS (n=0) at rts\sm\BlockAlloc.c:702
702 osReleaseFreeMemory();
(gdb)
#2 0x005b9e44 in GarbageCollect (force_major_gc=rtsFalse, gc_type=0,
cap=0x6310a0) at rts\sm\GC.c:758
758 returnMemoryToOS(got - need);
(gdb) p got
$2 = 23
(gdb) p need
$3 = 12
(gdb)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4506#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs