Navigation Menu

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

Assertion failed dans alloc.c #2986

Closed
vicuna opened this issue Oct 8, 2001 · 2 comments
Closed

Assertion failed dans alloc.c #2986

vicuna opened this issue Oct 8, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 8, 2001

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

Bug description

En utilisant libcamlrund.a pour déboguer un truc, j'ai eu ça (bien
avant que mon bogue n'arrive):
/usr/local/adm/src/caml/bin/cash tflush.ml

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
Starting new major GC cycle

O'Caml runtime: heap check

!<>$<Growing heap to 496k bytes
Growing page table to 390 entries

$file alloc.c; line 36 ### Assertion failed: wosize > 0

Avec un breakpoint dans caml_failed_assert, la trace de la pile est:
Breakpoint 1, caml_failed_assert (expr=0x80728e9 "wosize > 0",
file=0x80728e1 "alloc.c", line=36) at misc.c:27
gdb:bt
#0 caml_failed_assert (expr=0x80728e9 "wosize > 0", file=0x80728e1 "alloc.c",
line=36) at misc.c:27
#1 0x80587e1 in alloc (wosize=0, tag=0) at alloc.c:36
#2 0x8058b24 in alloc_tuple (n=0) at alloc.c:64
#3 0x8069c82 in dynlink_get_current_libs (unit=1) at dynlink.c:215
#4 0x806bc85 in interprete (prog=0x401dc008, prog_size=1080172)
at interp.c:830
#5 0x806d3c5 in caml_main (argv=0xbffff174) at startup.c:390
#6 0x8057c02 in main (argc=2, argv=0xbffff174) at main.c:41

et dans dynlink_get_current_libs, on fait effectivement un alloc (0),
car:
#3 0x8069c82 in dynlink_get_current_libs (unit=1) at dynlink.c:215
gdb:p shared_libs
$1 = {size = 0, capacity = 8, contents = 0x807a158}
---------^^^^^^^^

alloc.c compilé sans -DDEBUG ne semble pas s'en porter plus mal, par
contre.

Bruno.

@vicuna
Copy link
Author

vicuna commented Oct 12, 2001

Comment author: administrator

En utilisant libcamlrund.a pour déboguer un truc, j'ai eu ça (bien
avant que mon bogue n'arrive):

$file alloc.c; line 36 ### Assertion failed: wosize > 0
et dans dynlink_get_current_libs, on fait effectivement un alloc (0),

C'est en effet un bug. Damien a corrigé cela en traitant le cas
wosize = 0 correctement dans la fonction alloc(). Merci de l'avoir
signalé, parce qu'un objet de taille 0 dans le tas mineur peut
sérieusement casser le GC :-)

  • Xavier

@vicuna
Copy link
Author

vicuna commented Oct 12, 2001

Comment author: administrator

Fixed 2001-10-10 by DD.

@vicuna vicuna closed this as completed Oct 12, 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