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

GC issue in otherlibs/win32unix/stat.c #3998

Closed
vicuna opened this issue Apr 3, 2006 · 4 comments
Closed

GC issue in otherlibs/win32unix/stat.c #3998

vicuna opened this issue Apr 3, 2006 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 3, 2006

Original bug ID: 3998
Reporter: jyh
Status: closed (set by @damiendoligez on 2006-04-14T09:06:48Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 3.09.1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: n8gray nogin

Bug description

There is a GC-related bug in otherlibs/win32unix/stat.c.
A patch is attached.

Summary: the "living in harmony with the garbage collector" conventions are not being followed.

The fix is trivial. Tracking it down was not!:)

File attachments

@vicuna
Copy link
Author

vicuna commented Apr 6, 2006

Comment author: @damiendoligez

Fixed in 3.09.2+dev8. Will be fixed in 3.09.3.

I have fixed it by using the modern way of interfacing C with OCaml.
If you have a repro case, please test it.

@vicuna
Copy link
Author

vicuna commented Apr 6, 2006

Comment author: jyh

I don't see this in cvs, I'll look around, see if I can find it somewhere else.

Is there any way this can be squeezed into the 3.09.2 release?

I realize the time frame is short, but we have a reasonably large subcommunity using Win32 omake. I would hate to have to tell them that the stock OCaml distro won't work until 3.09.3, so they will need to patch OCaml and compile it themselves...

To describe the problem more, on moderately large projects, omake makes about ~10-20k calls to Unix.LargeFile.stat per run. We see the heap corruption about one run in 5, but it is highly unpredictable. The effect is usually a segfault, sometimes database corruption. In short, it would be great to have this fixed...

@vicuna
Copy link
Author

vicuna commented Apr 6, 2006

Comment author: nogin

The fix went onto the release309 branch. You can see the commit at http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/otherlibs/win32unix/stat.c.diff?r1=1.1;r2=1.1.14.1;f=h

@vicuna
Copy link
Author

vicuna commented Apr 11, 2006

Comment author: jyh

This appears to work perfectly.

@vicuna vicuna closed this as completed Apr 14, 2006
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant