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

Seg fault with -custom and 2049 lets #2747

Closed
vicuna opened this issue Apr 17, 2001 · 1 comment
Closed

Seg fault with -custom and 2049 lets #2747

vicuna opened this issue Apr 17, 2001 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 17, 2001

Original bug ID: 339
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: David Fox
Version:
OS:
Submission from: estephe.inria.fr (128.93.11.95)
Submitted by: xleroy

If I create a program with 2049 simple functions:

let f1 () = ()
let f2 () = ()
...
let f2049 () = ()

(You can build this using yes "" | cat -n | head -2049 |
sed 's/^[^0-9]([0-9])[^0-9]*$/let f\1 () = ()/' > y.ml)

I get a seg fault if I compile it with the -custom flag and use a
debugging version of malloc:

% ocamlc -custom y.ml -ccopt -lefence
% ./a.out

Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens bruce@perens.com
Segmentation fault (core dumped)
%

or if I link using the debugging library libcamlrund.a:

% ./a.out

O'Caml runtime: debug mode

Initial minor heap size: 128k bytes
Initial major heap size: 248k bytes
Initial space overhead: 42%
Initial max overhead: 1000000%
Initial heap increment: 248k bytes
Initial stack limit: 1024k bytes
file interp.c; line 255 ### Assertion failed: sp >= stack_low

If I use the regular (non-debugging) library I don't get the seg fault
immediately, but in a real life situation things get ugly pretty
quickly.

@vicuna
Copy link
Author

vicuna commented May 28, 2001

Comment author: administrator

Fixed 2001-05-28 by Xavier.

@vicuna vicuna closed this as completed May 28, 2001
@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