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

Moscow ML crashes after allocating a lot of memory #3

Closed
kfl opened this issue Apr 17, 2009 · 3 comments
Closed

Moscow ML crashes after allocating a lot of memory #3

kfl opened this issue Apr 17, 2009 · 3 comments

Comments

@kfl
Copy link
Owner

kfl commented Apr 17, 2009

Due to a change in GNU malloc, Moscow ML may crash on 64 bit architectures as well as on those 32 bit architectures that use glibc 2.7.

Originally reported by HOL developers

@kfl
Copy link
Owner Author

kfl commented Apr 17, 2009

Can be fixed by disabling the use of mmap from malloc.

For example by adding
mallopt(M_MMAP_MAX, 0);
to `init_gc` in `gc_ctrl.c` before setting the minor heap size.

@kfl
Copy link
Owner Author

kfl commented Jun 11, 2010

The above fix with mallopt is of cause just hiding the root cause.

It's more likely that the bug is to be found somewhere in the GC. For example, at
http://github.com/kfl/mosml/blob/Rel-2.10/src/runtime/memory.c#L45
we assign a negative value to an unsigned value. And at
http://github.com/kfl/mosml/blob/Rel-2.10/src/runtime/memory.c#L58
we free memory allocated by alligned_alloc.

@ghost ghost assigned kfl Apr 11, 2011
Munksgaard pushed a commit to Munksgaard/mosml that referenced this issue Aug 30, 2012
@kfl
Copy link
Owner Author

kfl commented Nov 28, 2012

This issue should now be fixed

@kfl kfl closed this as completed Nov 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant