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

Crash #5621

Closed
vicuna opened this issue May 24, 2012 · 2 comments
Closed

Crash #5621

vicuna opened this issue May 24, 2012 · 2 comments

Comments

@vicuna
Copy link

vicuna commented May 24, 2012

Original bug ID: 5621
Reporter: probugers
Status: closed (set by @xavierleroy on 2017-02-16T13:24:00Z)
Resolution: suspended
Priority: normal
Severity: crash
Platform: Camllight Linux
OS: Linux x86
OS Version: Linux 2.6.28-19
Version: <=3.07
Target version: later
Category: -for Caml light use https://github.com/camllight/camllight/issues
Monitored by: @pierreweis

Bug description

Toplevel crashes as soon as one ask for a few million bytes of memory. See program below.

Steps to reproduce

  Caml Light version 0.80

#type t = L of int | N of tt;;
let rec copy t = match t with L i -> L i | N(t1,t2) -> N(copy t1, copy t2);;
let rec double t = N(copy t,copy t);;
let rec pow n = match n with 0 -> L 0 | k -> double (pow (k-1));;
pow 3;;
let t = pow 25;;
Type t defined.
#copy : t -> t =
#double : t -> t =
#pow : int -> t =
#- : t = N (N (N (L 0, L 0), N (L 0, L 0)), N (N (L 0, L 0), N (L 0, L 0)))
#
** glibc detected *** /usr/bin/camlrun: free(): invalid pointer: 0x0884d000 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7602704]
/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb76046b6]
/usr/bin/camlrun[0x804e506]
/usr/bin/camlrun[0x804de47]
/usr/bin/camlrun[0x804de96]
/usr/bin/camlrun[0x804de96]
/usr/bin/camlrun[0x804eb04]
/usr/bin/camlrun[0x804df92]
/usr/bin/camlrun[0x804b5b5]
/usr/bin/camlrun[0x8049731]
/usr/bin/camlrun[0x804c85d]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb75a9775]
/usr/bin/camlrun[0x8048ff1]
======= Memory map: ========
08048000-08054000 r-xp 00000000 08:02 1480782 /usr/bin/camlrun
08054000-08055000 rw-p 0000b000 08:02 1480782 /usr/bin/camlrun
08055000-08056000 rw-p 08055000 00:00 0
08807000-0888e000 rw-p 08807000 00:00 0 [heap]
96f00000-96f21000 rw-p 96f00000 00:00 0
96f21000-97000000 ---p 96f21000 00:00 0
97024000-975d0000 rw-p 97024000 00:00 0
975e2000-975ef000 r-xp 00000000 08:02 1455628 /lib/libgcc_s.so.1
975ef000-975f0000 r--p 0000c000 08:02 1455628 /lib/libgcc_s.so.1
975f0000-975f1000 rw-p 0000d000 08:02 1455628 /lib/libgcc_s.so.1
975f1000-b7593000 rw-p 975f1000 00:00 0
b7593000-b76ef000 r-xp 00000000 08:02 1464981 /lib/tls/i686/cmov/libc-2.9.so
b76ef000-b76f0000 ---p 0015c000 08:02 1464981 /lib/tls/i686/cmov/libc-2.9.so
b76f0000-b76f2000 r--p 0015c000 08:02 1464981 /lib/tls/i686/cmov/libc-2.9.so
b76f2000-b76f3000 rw-p 0015e000 08:02 1464981 /lib/tls/i686/cmov/libc-2.9.so
b76f3000-b76f6000 rw-p b76f3000 00:00 0
b76f6000-b771a000 r-xp 00000000 08:02 1464985 /lib/tls/i686/cmov/libm-2.9.so
b771a000-b771b000 r--p 00023000 08:02 1464985 /lib/tls/i686/cmov/libm-2.9.so
b771b000-b771c000 rw-p 00024000 08:02 1464985 /lib/tls/i686/cmov/libm-2.9.so
b7732000-b7734000 rw-p b7732000 00:00 0
b7734000-b7735000 r-xp b7734000 00:00 0 [vdso]
b7735000-b7751000 r-xp 00000000 08:02 1455606 /lib/ld-2.9.so
b7751000-b7752000 r--p 0001b000 08:02 1455606 /lib/ld-2.9.so
b7752000-b7753000 rw-p 0001c000 08:02 1455606 /lib/ld-2.9.so
bfee8000-bfefd000 rw-p bffeb000 00:00 0 [stack]

Process caml-toplevel abandon

Additional information

$ uname -a
Linux b313-p08 2.6.28-19-generic #61-Ubuntu SMP Wed May 26 23:35:15 UTC 2010 i686 GNU/Linux
$ dpkg -l camllight
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/H=à garder/besoin Réinstallation/X=les deux (État,Err: majuscule=mauvais)
||/ Nom Version Description
+++-==============-==============-============================================
ii camllight 0.80 Camllight 0.80

@vicuna
Copy link
Author

vicuna commented Jun 26, 2012

Comment author: @damiendoligez

Can't reproduce on Mac OS.

Note that we are not actively maintaining Caml Light any more.
Maybe Pierre will want to look into this.

@vicuna
Copy link
Author

vicuna commented Feb 16, 2017

Comment author: @xavierleroy

Caml Light moved to Github. This PR is now at camllight/camllight#1

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