Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List reversal produced incorrect list if USE_MUNMAP+GC_GCJ_SUPPORT (Mingw32) #137

Closed
ivmai opened this issue Nov 26, 2016 · 3 comments
Closed

Comments

@ivmai
Copy link
Owner

ivmai commented Nov 26, 2016

i686-w64-mingw32-gcc -I include -DUSE_MMAP -DUSE_MUNMAP -DGC_GCJ_SUPPORT -I libatomic_ops/src -O0 -g tests/test.c extra/gc.c

Simplified code to reproduce the crash:
sexpr h;
int i;
h = gcj_ints(1,200);
for (i = 0; i < 10; ++i) {
check_ints(h, 1,200);
h = gcj_reverse(h);
h = gcj_reverse(h);
}
check_ints(h, 1,200); // check fails here

@ivmai
Copy link
Owner Author

ivmai commented Nov 29, 2016

Also SIGSEGV in check_ints reproduced with: i686-w64-mingw32-gcc -I include -DGC_GCJ_SUPPORT -O0 -g tests/test.c extra/gc.c
Not happen if -DNO_INCREMENTAL.

@ivmai
Copy link
Owner Author

ivmai commented Jan 12, 2017

This issue could be fixed by 2 changes:

ivmai added a commit that referenced this issue Jan 19, 2017
…k_from"

Issue #137 (bdwgc).

This reverts commit 57f36b9.

Because it breaks gctest "list reversal" if compiled with
GC_GCJ_SUPPORT for MinGW/x86.  This is caused by the fact that static
data roots could be between two GC heap regions thus GC with the patch
skips scanning of a reachable GCJ object with a descriptor located in
the static data roots.

To fix the issue (#92) of mistaking the free list pointers in free
objects for being type descriptor pointers, another approach should be
taken (e.g. marking objects in free lists).
@ivmai
Copy link
Owner Author

ivmai commented Jan 19, 2017

The issue cannot be reproduced after the above revert (by ef5041d).
Also to check that reclaiming of reachable objects that are not marked yet during true incremental GC, an assertion is added - 2c5aebc

@ivmai ivmai closed this as completed Jan 19, 2017
ivmai added a commit that referenced this issue Feb 7, 2017
…k_from"

Issue #137 (bdwgc).

This reverts commit 57f36b9.

Because it breaks gctest "list reversal" if compiled with
GC_GCJ_SUPPORT for MinGW/x86.  This is caused by the fact that static
data roots could be between two GC heap regions thus GC with the patch
skips scanning of a reachable GCJ object with a descriptor located in
the static data roots.

To fix the issue (#92) of mistaking the free list pointers in free
objects for being type descriptor pointers, another approach should be
taken (e.g. marking objects in free lists).
ivmai added a commit that referenced this issue Feb 7, 2017
…k_from"

Issue #137 (bdwgc).

This reverts commit 57f36b9.

Because it breaks gctest "list reversal" if compiled with
GC_GCJ_SUPPORT for MinGW/x86.  This is caused by the fact that static
data roots could be between two GC heap regions thus GC with the patch
skips scanning of a reachable GCJ object with a descriptor located in
the static data roots.

To fix the issue (#92) of mistaking the free list pointers in free
objects for being type descriptor pointers, another approach should be
taken (e.g. marking objects in free lists).
ivmai added a commit that referenced this issue Feb 9, 2017
…k_from"

Issue #137 (bdwgc).

This reverts commit 57f36b9.

Because it breaks gctest "list reversal" if compiled with
GC_GCJ_SUPPORT for MinGW/x86.  This is caused by the fact that static
data roots could be between two GC heap regions thus GC with the patch
skips scanning of a reachable GCJ object with a descriptor located in
the static data roots.

To fix the issue (#92) of mistaking the free list pointers in free
objects for being type descriptor pointers, another approach should be
taken (e.g. marking objects in free lists).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant